Skip to content

Commit

Permalink
fix: not applying default limit and offset
Browse files Browse the repository at this point in the history
  • Loading branch information
Joao Pedro Henrique committed Jan 16, 2023
1 parent 35aeb2e commit 71c722b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/app/pages/api/flights/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
),
});

Expand Down

1 comment on commit 71c722b

@vercel
Copy link

@vercel vercel bot commented on 71c722b Jan 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mach – ./

mach-jpedroh.vercel.app
mach.jpedroh.dev
mach-git-master-jpedroh.vercel.app
mach-five.vercel.app

Please sign in to comment.