feat: add Zod validation schemas for all domain routes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
11
src/schemas/profile.schema.ts
Normal file
11
src/schemas/profile.schema.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export const UpdateProfileSchema = z.object({
|
||||
email: z.string().email('Neplatný formát e-mailu').optional(),
|
||||
first_name: z.string().optional(),
|
||||
last_name: z.string().optional(),
|
||||
current_password: z.string().optional(),
|
||||
new_password: z.string().optional(),
|
||||
});
|
||||
|
||||
export type UpdateProfileInput = z.infer<typeof UpdateProfileSchema>;
|
||||
Reference in New Issue
Block a user