feat: create route to search for titles

Summary:

Test Plan:
This commit is contained in:
2024-05-16 01:21:06 -04:00
parent 359b73c7a8
commit 88b1a4ced5
13 changed files with 3808 additions and 4 deletions

View File

@@ -9,6 +9,14 @@ export const SuccessResponseSchema = <T extends ZodSchema>(schema?: T) => {
return z.object({ success: z.literal(true), result: schema });
};
export const PaginatedResponseSchema = <T extends ZodSchema>(schema: T) => {
return z.object({
success: z.boolean(),
results: z.array(schema),
hasNextPage: z.boolean(),
});
};
export const ErrorResponseSchema = z.object({
success: z.literal(false),
});