Skip to content

Commit

Permalink
npm run format
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Mar 15, 2024
1 parent 80ef2de commit 83b7edf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
14 changes: 8 additions & 6 deletions ui/app/api/peers/info/[peerName]/route.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import prisma from '@/app/utils/prisma';
import {NextRequest, NextResponse} from 'next/server';
import { NextRequest, NextResponse } from 'next/server';

import {getTruePeer} from '../../getTruePeer';
import { getTruePeer } from '../../getTruePeer';

export async function GET(request: NextRequest,
context: {params: {peerName: string}}) {
export async function GET(
request: NextRequest,
context: { params: { peerName: string } }
) {
const peerName = context.params.peerName;
const peer = await prisma.peers.findFirst({
where : {
name : peerName,
where: {
name: peerName,
},
});
const peerConfig = getTruePeer(peer!);
Expand Down
17 changes: 12 additions & 5 deletions ui/app/peers/create/[peerType]/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,18 @@ export const kaSchema = z.object({
.string({ required_error: 'Password is required' })
.min(1, { message: 'Password cannot be empty' }),
sasl: z
.union([z.literal('PLAIN'), z.literal('SCRAM-SHA-256'), z.literal('SCRAM-SHA-512')], {
errorMap: () => ({
message: 'One of PLAIN, SCRAM-SHA-256, or SCRAM-SHA-512 is required.',
}),
})
.union(
[
z.literal('PLAIN'),
z.literal('SCRAM-SHA-256'),
z.literal('SCRAM-SHA-512'),
],
{
errorMap: () => ({
message: 'One of PLAIN, SCRAM-SHA-256, or SCRAM-SHA-512 is required.',
}),
}
)
.optional(),
disableTls: z.boolean().optional(),
});
Expand Down

0 comments on commit 83b7edf

Please sign in to comment.