Bansari Akhani commited on
Commit
6b4f322
·
1 Parent(s): 8cd1462

remove frontedn_url from env and use app url insteaad in reset pwd mail

Browse files
.env.build.develop CHANGED
@@ -2,4 +2,3 @@ PORT=3000
2
  APP_URL=https://develop.fusionbills.com/
3
  AI_SERVICE_URL=http://ai:8000/api/v1
4
  NODE_ENV=development
5
- FRONTEND_URL=https://develop.fusionbills.com
 
2
  APP_URL=https://develop.fusionbills.com/
3
  AI_SERVICE_URL=http://ai:8000/api/v1
4
  NODE_ENV=development
 
src/controllers/auth.controller.ts CHANGED
@@ -71,7 +71,7 @@ export const forgotPassword = async (req: Request, res: Response) => {
71
  reset_token: resetToken,
72
  reset_token_expiry: resetTokenExpiry
73
  });
74
- const resetLink = `${process.env.FRONTEND_URL}/reset-password?token=${resetToken}`;
75
 
76
  sendMail({
77
  subject: 'Your password reset link',
@@ -159,4 +159,4 @@ export const changePassword = async (req: AuthenticatedRequest, res: Response) =
159
  logger.error("Error changing password: ", error);
160
  return res.status(500).json({ error: 'Internal server error' });
161
  }
162
- }
 
71
  reset_token: resetToken,
72
  reset_token_expiry: resetTokenExpiry
73
  });
74
+ const resetLink = `${process.env.APP_URL}reset-password?token=${resetToken}`;
75
 
76
  sendMail({
77
  subject: 'Your password reset link',
 
159
  logger.error("Error changing password: ", error);
160
  return res.status(500).json({ error: 'Internal server error' });
161
  }
162
+ }