From aa12f893e813ffede140d5a719583c9cb3d5007b Mon Sep 17 00:00:00 2001 From: Agusti Fernandez Pardo Date: Thu, 14 Jul 2022 19:44:24 +0200 Subject: [PATCH] fix: users pagination remove min/max as its a string not a number, also add new env var to example --- .env.example | 1 + lib/helpers/withPagination.ts | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 1c0f6152c1..eec3f283f7 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,3 @@ API_KEY_PREFIX=cal_ DATABASE_URL="postgresql://postgres:@localhost:5450/calendso" +NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000 \ No newline at end of file diff --git a/lib/helpers/withPagination.ts b/lib/helpers/withPagination.ts index 8e2da388f5..32ff4a7289 100644 --- a/lib/helpers/withPagination.ts +++ b/lib/helpers/withPagination.ts @@ -4,14 +4,11 @@ import z from "zod"; const withPage = z.object({ page: z .string() - .min(1) .optional() .default("1") .transform((n) => parseInt(n)), take: z .string() - .min(10) - .max(100) .optional() .default("10") .transform((n) => parseInt(n)),