paginationSchema: don't set a default for `until`
This commit is contained in:
parent
ccffe3abea
commit
8bed0c17be
|
@ -115,7 +115,7 @@ async function parseBody(req: Request): Promise<unknown> {
|
||||||
/** Schema to parse pagination query params. */
|
/** Schema to parse pagination query params. */
|
||||||
const paginationSchema = z.object({
|
const paginationSchema = z.object({
|
||||||
since: z.coerce.number().optional().catch(undefined),
|
since: z.coerce.number().optional().catch(undefined),
|
||||||
until: z.lazy(() => z.coerce.number().catch(nostrNow())),
|
until: z.coerce.number().optional().catch(undefined),
|
||||||
limit: z.coerce.number().catch(20).transform((value) => Math.min(Math.max(value, 0), 40)),
|
limit: z.coerce.number().catch(20).transform((value) => Math.min(Math.max(value, 0), 40)),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue