diff --git a/src/controller/userController.ts b/src/controller/userController.ts index 8d26839..9a2f752 100644 --- a/src/controller/userController.ts +++ b/src/controller/userController.ts @@ -256,11 +256,12 @@ export const recoverPassword = errorHandler( { expiresIn: '1h' } ); - const confirmLink = `${process.env.APP_URL}/api/v1/user/recover/confirm?recoverToken=${recoverToken}`; + const confirmLink = `${process.env.FRONTEND_URL}/reset-password/${recoverToken}`; + + sendEmail('reset', user.email, {name: user.firstName, link:confirmLink}) return res.status(200).json({ message: 'Password reset token generated successfully', - confirmLink, }); } );