feat(api): add user info GET endpoint and blocklist usernames
This commit is contained in:
parent
57e420f572
commit
28aa8d3a82
5 changed files with 110 additions and 4 deletions
|
@ -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'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue