Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Still working on the tutorial, added new steps
- Loading branch information
1 parent
499963c
commit 75b1792
Showing
2 changed files
with
7 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import { validator } from '../validator/auth.validator' | ||
import { procErr } from '../utilities/processErrors' | ||
import { login, | ||
forgotPassword } from '../controller/auth.controller' | ||
|
||
// Routes ============================================================= | ||
module.exports = router => { | ||
|
||
// POST route to mock a login endpoint | ||
router.post("/api/login", validator('login'), login) | ||
router.post("/api/login", validator('login'), procErr, login) | ||
|
||
// POST route to mock a forgotten password endpoint | ||
router.post("/api/forgot-password", validator('forgotPassword'), forgotPassword) | ||
router.post("/api/forgot-password", validator('forgotPassword'), procErr, forgotPassword) | ||
|
||
} |