mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
feat: send email to user on successful password reset
This commit is contained in:
committed by
Mythie
parent
84bc6eb4f3
commit
dabeead57f
@ -3,6 +3,7 @@ import { compare, hash } from 'bcrypt';
|
||||
import { prisma } from '@documenso/prisma';
|
||||
|
||||
import { SALT_ROUNDS } from '../../constants/auth';
|
||||
import { sendResetPassword } from '../auth/send-reset-password';
|
||||
|
||||
export type ResetPasswordOptions = {
|
||||
token: string;
|
||||
@ -61,6 +62,6 @@ export const resetPassword = async ({ token, password }: ResetPasswordOptions) =
|
||||
throw new Error('Unable to update password');
|
||||
}
|
||||
|
||||
// await sendResetPasswordSuccessMail(foundToken.User);
|
||||
await sendResetPassword({ userId: foundToken.userId });
|
||||
return transactions;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user