mirror of
https://github.com/CaramelFur/Picsur.git
synced 2025-11-17 00:30:37 +01:00
small fixes
This commit is contained in:
@@ -26,3 +26,12 @@ export const ApiResponseSchema = <T extends z.AnyZodObject>(data: T) =>
|
||||
ApiErrorResponse.or(ApiSuccessResponse(data));
|
||||
|
||||
export type ApiErrorResponse = z.infer<typeof ApiErrorResponse>;
|
||||
|
||||
const ApiAnySuccessResponseSchema = ApiSuccessResponse(z.object({}))
|
||||
.omit({ data: true })
|
||||
.merge(
|
||||
z.object({
|
||||
data: z.any(),
|
||||
}),
|
||||
);
|
||||
export type ApiAnySuccessResponse = z.infer<typeof ApiAnySuccessResponseSchema>;
|
||||
|
||||
Reference in New Issue
Block a user