This repository has been archived by the owner on Jul 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ft(logout): add log out functionality (#20)
- add a log-out route - add a logout function - add logout tests - change authController to userController - change authRoute to userRoutes [Finishes #170947550]
- Loading branch information
Showing
15 changed files
with
335 additions
and
164 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,15 +1,15 @@ | ||
import express from 'express'; | ||
import AuthController from '../controllers/authController'; | ||
import verificationController from '../controllers/verificationController'; | ||
import validateParams from '../validation/validateParams'; | ||
import validationResult from '../validation/validationResult'; | ||
import signupInputRules from '../validation/validationRules'; | ||
|
||
import verificationController from '../controllers/verificationController'; | ||
import validateParams from '../validation/validateParams'; | ||
|
||
const authRouter = express.Router(); | ||
|
||
authRouter.post('/register', signupInputRules, validationResult, AuthController.registerUser); | ||
authRouter.get('/verification', validateParams.validateToken, verificationController.verifyAccount); | ||
authRouter.post('/login', AuthController.login); | ||
authRouter.get('/logout', AuthController.logout); | ||
|
||
export default authRouter; |
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,7 +1,9 @@ | ||
{ | ||
"Welcome to devRepublic Barefoot Nomad API": "Welcome to devRepublic Barefoot Nomad API", | ||
"register": "register", | ||
"signup": "signup", | ||
"login": "login", | ||
"logout": "logout" | ||
"Welcome to devRepublic Barefoot Nomad API": "Welcome to devRepublic Barefoot Nomad API", | ||
"register": "register", | ||
"signup": "signup", | ||
"login": "login", | ||
"logout": "logout", | ||
"User is successfully logged out": "User is successfully logged out", | ||
"Login first or create an account if you do not have one": "Login first or create an account if you do not have one" | ||
} |
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,7 +1,8 @@ | ||
{ | ||
"Welcome to devRepublic Barefoot Nomad API": "Bienvenue au devRepublic Barefoot Nomad API", | ||
"register": "enregistrer", | ||
"signup": "enregistrer", | ||
"login": "connecter", | ||
"logout": "déconnecter" | ||
"Welcome to devRepublic Barefoot Nomad API": "Bienvenue au devRepublic Barefoot Nomad API", | ||
"register": "enregistrer", | ||
"signup": "enregistrer", | ||
"login": "connecter", | ||
"logout": "déconnecter", | ||
"User is successfully logged out": "l'utilisateur s'est déconnecté avec succès" | ||
} |
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
Oops, something went wrong.