From 71c722b3450fc65c3e56f20bda3f41f5885973e0 Mon Sep 17 00:00:00 2001 From: Joao Pedro Henrique Date: Sun, 15 Jan 2023 22:06:57 -0300 Subject: [PATCH] fix: not applying default limit and offset --- packages/app/pages/api/flights/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/pages/api/flights/index.ts b/packages/app/pages/api/flights/index.ts index cfe33bbc..823f217b 100644 --- a/packages/app/pages/api/flights/index.ts +++ b/packages/app/pages/api/flights/index.ts @@ -18,11 +18,11 @@ const schema = z.object({ .optional(), limit: z.preprocess( (x) => (x ? Number(x) : undefined), - z.number().min(1).optional().default(15).optional() + z.number().min(1).default(15) ), offset: z.preprocess( (x) => (x ? Number(x) : undefined), - z.number().min(0).optional().default(0).optional() + z.number().min(0).default(0) ), });