mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
paginationSchema: don't set a default for until
This commit is contained in:
parent
ccffe3abea
commit
8bed0c17be
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue