refactor(validation): restucture api input and output validation
All checks were successful
container-scan / Container Scan (pull_request) Successful in 5m17s
docker-build / docker (pull_request) Successful in 6m1s

This commit is contained in:
Dominik 2025-06-18 21:36:30 +02:00
parent 485a95f99a
commit eef17c5360
Signed by: dominik
GPG key ID: 06A4003FC5049644
34 changed files with 1891 additions and 1802 deletions

View file

@ -0,0 +1,21 @@
import zod from 'zod/v4';
import {
firstNameSchema,
lastNameSchema,
newUserEmailServerSchema,
newUserNameServerSchema,
} from '@/app/api/user/validation';
// ----------------------------------------
//
// Update User Validation
//
// ----------------------------------------
export const updateUserServerSchema = zod.object({
name: newUserNameServerSchema.optional(),
first_name: firstNameSchema.optional(),
last_name: lastNameSchema.optional(),
email: newUserEmailServerSchema.optional(),
image: zod.string().optional(),
timezone: zod.string().optional(),
});