feat(api): add user info GET endpoint and blocklist usernames

This commit is contained in:
Dominik 2025-06-12 19:00:57 +02:00
parent 57e420f572
commit 28aa8d3a82
Signed by: dominik
GPG key ID: 06A4003FC5049644
5 changed files with 110 additions and 4 deletions

View file

@ -23,7 +23,7 @@ export const userNameSchema = zod
/^[a-zA-Z0-9_]+$/,
'Username can only contain letters, numbers, and underscores',
);
export const loginSchema = zod.object({
email: userEmailSchema.or(userNameSchema),
password: zod.string().min(1, 'Password is required'),
@ -60,3 +60,5 @@ export const registerSchema = zod
path: ['password'],
},
);
export const disallowedUsernames = ['me', 'admin', 'search'];