mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-19 14:34:22 +01:00
paginationSchema: fix problem with nostrNow() being called only at startup
This commit is contained in:
@@ -80,7 +80,7 @@ async function parseBody(req: Request): Promise<unknown> {
|
|||||||
|
|
||||||
const paginationSchema = z.object({
|
const paginationSchema = z.object({
|
||||||
since: z.coerce.number().optional().catch(undefined),
|
since: z.coerce.number().optional().catch(undefined),
|
||||||
until: z.coerce.number().catch(nostrNow()),
|
until: z.lazy(() => z.coerce.number().catch(nostrNow())),
|
||||||
limit: z.coerce.number().min(0).max(40).catch(20),
|
limit: z.coerce.number().min(0).max(40).catch(20),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user