feat: add edit user page (#173)

This commit is contained in:
Manuel
2024-03-05 21:10:19 +01:00
committed by GitHub
parent 8c9adb31f3
commit 41b99f191c
7 changed files with 394 additions and 9 deletions

View File

@@ -22,9 +22,21 @@ const signInSchema = z.object({
password: z.string(),
});
const editProfileSchema = z.object({
name: usernameSchema,
email: z
.string()
.email()
.or(z.literal(""))
.transform((value) => (value === "" ? null : value))
.optional()
.nullable(),
});
export const userSchemas = {
signIn: signInSchema,
init: initUserSchema,
create: createUserSchema,
password: passwordSchema,
editProfile: editProfileSchema,
};