paginationSchema: fix problem with nostrNow() being called only at startup
This commit is contained in:
parent
cc751f03a7
commit
c80a9e5d9a
|
@ -80,7 +80,7 @@ async function parseBody(req: Request): Promise<unknown> {
|
|||
|
||||
const paginationSchema = z.object({
|
||||
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),
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue