mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 04:22:32 +10:00
feat: avoid updating password with existing password
This commit is contained in:
committed by
Mythie
parent
9524875e98
commit
cd1b4796fc
@ -40,12 +40,13 @@ export const profileRouter = router({
|
||||
password,
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
const errorMessage = (err as { message?: string }).message;
|
||||
|
||||
throw new TRPCError({
|
||||
code: 'BAD_REQUEST',
|
||||
message:
|
||||
'We were unable to update your profile. Please review the information you provided and try again.',
|
||||
message: errorMessage
|
||||
? errorMessage
|
||||
: 'We were unable to update your profile. Please review the information you provided and try again.',
|
||||
});
|
||||
}
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user