mirror of
https://github.com/aljazceru/ditto.git
synced 2026-02-18 03:34:20 +01:00
paginationSchema: don't set a default for until
This commit is contained in:
@@ -115,7 +115,7 @@ async function parseBody(req: Request): Promise<unknown> {
|
||||
/** Schema to parse pagination query params. */
|
||||
const paginationSchema = z.object({
|
||||
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)),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user