diff --git a/ui/app/api/peers/info/[peerName]/route.ts b/ui/app/api/peers/info/[peerName]/route.ts index 1e90bbdde6..61dc033efb 100644 --- a/ui/app/api/peers/info/[peerName]/route.ts +++ b/ui/app/api/peers/info/[peerName]/route.ts @@ -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!); diff --git a/ui/app/peers/create/[peerType]/schema.ts b/ui/app/peers/create/[peerType]/schema.ts index 76b68cf28a..078d36b807 100644 --- a/ui/app/peers/create/[peerType]/schema.ts +++ b/ui/app/peers/create/[peerType]/schema.ts @@ -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(), });