feat: add edit user page (#173)

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

No files matched your search

+12
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,
};