schemas/nostr: add `search` key to filters

This commit is contained in:
Alex Gleason 2023-08-30 16:19:21 -05:00
parent af76d8cbae
commit e976f51d55
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 0 deletions

View File

@ -29,6 +29,7 @@ const filterSchema = z.object({
since: z.number().int().nonnegative().optional(), since: z.number().int().nonnegative().optional(),
until: z.number().int().nonnegative().optional(), until: z.number().int().nonnegative().optional(),
limit: z.number().int().nonnegative().optional(), limit: z.number().int().nonnegative().optional(),
search: z.string().optional(),
}).passthrough().and( }).passthrough().and(
z.record( z.record(
z.custom<`#${string}`>((val) => typeof val === 'string' && val.startsWith('#')), z.custom<`#${string}`>((val) => typeof val === 'string' && val.startsWith('#')),