From ce3677cf506a728e1c218c177494fe2941222b20 Mon Sep 17 00:00:00 2001 From: TZGyn Date: Sun, 10 Mar 2024 02:27:50 +0800 Subject: [PATCH] update shortener create to allow undefined projectId --- frontend/src/routes/api/shortener/+server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/routes/api/shortener/+server.ts b/frontend/src/routes/api/shortener/+server.ts index b6377b6..36194b8 100644 --- a/frontend/src/routes/api/shortener/+server.ts +++ b/frontend/src/routes/api/shortener/+server.ts @@ -9,8 +9,8 @@ export const GET: RequestHandler = async () => { } const shortenerInsertSchema = z.object({ - link: z.string().url(), - projectId: z.number().nullable(), + link: z.string().url('Link must be in url format'), + projectId: z.number().nullish(), }) export const POST: RequestHandler = async (event) => {