mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 04:22:32 +10:00
Remove tokens on successful password reset
This commit is contained in:
@ -48,9 +48,9 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
|
||||
password: hashedPassword,
|
||||
},
|
||||
}),
|
||||
prisma.passwordResetToken.delete({
|
||||
prisma.passwordResetToken.deleteMany({
|
||||
where: {
|
||||
token,
|
||||
userId: foundToken.userId,
|
||||
},
|
||||
}),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user