mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
chore: refactor
This commit is contained in:
@ -135,11 +135,15 @@ export const profileRouter = router({
|
||||
.input(ZConfirmEmailMutationSchema)
|
||||
.mutation(async ({ input }) => {
|
||||
try {
|
||||
const { email } = input;
|
||||
const { encryptedEmail } = input;
|
||||
|
||||
const decryptedEmail = decryptSecondaryData(email);
|
||||
const decryptedEmail = decryptSecondaryData(encryptedEmail);
|
||||
|
||||
return await sendConfirmationToken({ email: decryptedEmail ?? '' }); // TODO: fix this tomorrow
|
||||
if (!decryptedEmail) {
|
||||
throw new Error('Email is required');
|
||||
}
|
||||
|
||||
return await sendConfirmationToken({ email: decryptedEmail });
|
||||
} catch (err) {
|
||||
let message = 'We were unable to send a confirmation email. Please try again.';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user