feat(api): implement /api/user/me endpoint

This commit is contained in:
Dominik 2025-06-20 13:28:33 +02:00
parent 87dc6162f4
commit 3e890d4363
Signed by: dominik
GPG key ID: 06A4003FC5049644
5 changed files with 439 additions and 0 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(),
});