Skip to content

Commit

Permalink
fix: resolve pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shishirbychapur committed Sep 23, 2024
1 parent 067e6e6 commit 7b22a74
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
3 changes: 2 additions & 1 deletion backend/user-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"license": "MIT",
"description": "",
"dependencies": {
"@types/nodemailer": "^6.4.16",
"bcrypt": "^5.1.1",
"class-validator": "^0.14.1",
"cors": "^2.8.5",
Expand All @@ -37,6 +36,8 @@
"@types/helmet": "^0.0.48",
"@types/jest": "^29.5.13",
"@types/jsonwebtoken": "^9.0.7",
"@types/node": "^22.5.5",
"@types/nodemailer": "^6.4.16",
"@types/passport": "^1.0.16",
"@types/passport-local": "^1.0.38",
"@types/supertest": "^6.0.2",
Expand Down
6 changes: 3 additions & 3 deletions backend/user-service/src/controllers/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ export async function sendMail(to: string, subject: string, text: string, html:
port: 587,
secure: false,
auth: {
user: process.env.EMAIL,
pass: process.env.PASSWORD,
user: process.env.NODEMAILER_EMAIL,
pass: process.env.NODEMAILER_PASSWORD,
},
})
await transporter.sendMail({
from: process.env.EMAIL,
from: process.env.NODEMAILER_EMAIL,
to,
subject,
text,
Expand Down
4 changes: 2 additions & 2 deletions backend/user-service/src/routes/auth.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ passport.use(
const router = Router()

router.post('/login', passport.authenticate('local', { session: false }), handleLogin)
router.put('/reset', handleReset)
router.put('/verify', handleVerify)
router.post('/reset', handleReset)
router.post('/verify', handleVerify)

export default router
2 changes: 1 addition & 1 deletion backend/user-service/src/routes/user.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ router.post('/', handleCreateUser)
router.put('/:id', handleUpdateProfile)
router.get('/:id', handleGetCurrentProfile)
router.delete('/:id', handleDeleteUser)
router.put('/password/:id', handleUpdatePassword)
router.put('/:id/password', handleUpdatePassword)

export default router
6 changes: 5 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7b22a74

Please sign in to comment.