-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c80f8f5
commit d0cf2d5
Showing
5 changed files
with
130 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
const express = require("express"); | ||
const express = require('express'); | ||
const router = express.Router(); | ||
const { protect } = require("../middleware/auth"); | ||
const { protect } = require('../middleware/auth'); | ||
const { | ||
register, | ||
login, | ||
logout, | ||
forgotPassword, | ||
resetPassword | ||
} = require("../controllers/auth") | ||
register, | ||
login, | ||
logout, | ||
forgotPassword, | ||
resetPassword, | ||
changePassword | ||
} = require('../controllers/auth'); | ||
|
||
router.post('/register', register); | ||
router.post('/login', login); | ||
router.post('/google/redirect', login); | ||
router.get('/logout', logout); | ||
router.post('/forgot-password', forgotPassword); | ||
router.put('/reset-password', resetPassword); | ||
router.put('/change-password', protect, changePassword); | ||
|
||
router.post("/register", register); | ||
router.post("/login", login); | ||
router.post("/google/redirect", login); | ||
router.get("/logout", logout); | ||
router.post("/forgot-password", forgotPassword); | ||
router.put("/reset-password", resetPassword); | ||
|
||
module.exports = router; | ||
module.exports = router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters