feat: add edit user page (#173)
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user