style: format code
This commit is contained in:
parent
4cf5ce26ff
commit
29f2a01ac6
5 changed files with 28 additions and 18 deletions
|
@ -65,7 +65,10 @@ export const PATCH = auth(async function PATCH(req) {
|
|||
{ status: 400 },
|
||||
);
|
||||
|
||||
if (dbUser.accounts.length === 0 || dbUser.accounts[0].provider !== 'credentials')
|
||||
if (
|
||||
dbUser.accounts.length === 0 ||
|
||||
dbUser.accounts[0].provider !== 'credentials'
|
||||
)
|
||||
return returnZodTypeCheckedResponse(
|
||||
ErrorResponseSchema,
|
||||
{
|
||||
|
|
|
@ -157,4 +157,4 @@ export const DELETE = auth(async function DELETE(req) {
|
|||
},
|
||||
{ status: 200 },
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -22,10 +22,12 @@ export const updateUserServerSchema = zod.object({
|
|||
timezone: timezoneSchema.optional(),
|
||||
});
|
||||
|
||||
export const updateUserPasswordServerSchema = zod.object({
|
||||
current_password: zod.string().min(1, 'Current password is required'),
|
||||
new_password: passwordSchema,
|
||||
confirm_new_password: passwordSchema,
|
||||
}).refine((data) => data.new_password === data.confirm_new_password, {
|
||||
message: 'New password and confirm new password must match',
|
||||
});
|
||||
export const updateUserPasswordServerSchema = zod
|
||||
.object({
|
||||
current_password: zod.string().min(1, 'Current password is required'),
|
||||
new_password: passwordSchema,
|
||||
confirm_new_password: passwordSchema,
|
||||
})
|
||||
.refine((data) => data.new_password === data.confirm_new_password, {
|
||||
message: 'New password and confirm new password must match',
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue