mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-20 13:51:31 +00:00
🚧 WIP
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
import z, { type ZodSchema } from "zod";
|
||||
|
||||
export function createResponseBodySchema<T extends ZodSchema>(dataSchema: T) {
|
||||
return z.object({
|
||||
data: dataSchema.nullable(),
|
||||
success: z.boolean(),
|
||||
error: z.boolean(),
|
||||
message: z.string(),
|
||||
status: z.number()
|
||||
});
|
||||
}
|
||||
|
||||
export default createResponseBodySchema;
|
||||
Reference in New Issue
Block a user