feat: add health check
Summary: Test Plan:
This commit is contained in:
10
src/types/schema.ts
Normal file
10
src/types/schema.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { type ZodSchema, z } from "zod";
|
||||
|
||||
export const SuccessResponse = { success: true } as const;
|
||||
export const SuccessResponseSchema = <T extends ZodSchema>(schema?: T) => {
|
||||
if (!schema) {
|
||||
return z.object({ success: z.literal(true) });
|
||||
}
|
||||
|
||||
return z.object({ success: z.literal(true), result: schema });
|
||||
};
|
||||
Reference in New Issue
Block a user