feat: create route to search for titles
Summary: Test Plan:
This commit is contained in:
@@ -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),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user