diff options
author | Mateja <mail@matejamaric.com> | 2021-05-06 21:07:24 +0200 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2021-05-06 21:07:24 +0200 |
commit | 376fae2a3367d5813d088a29c5a62938bd55f762 (patch) | |
tree | 3812cbf552d90024550cc2e88e0ba2cf4927f191 /routes | |
parent | e0f29f19df909b7a49ac693d82ba5ff085d079a2 (diff) | |
download | node-playground-376fae2a3367d5813d088a29c5a62938bd55f762.tar.gz node-playground-376fae2a3367d5813d088a29c5a62938bd55f762.zip |
Boilerplate for login system.
Diffstat (limited to 'routes')
-rw-r--r-- | routes/web.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/routes/web.js b/routes/web.js index ee07d85..8960bb3 100644 --- a/routes/web.js +++ b/routes/web.js @@ -1,10 +1,19 @@ const express = require('express'); const router = express.Router(); const postController = require('../controllers/post'); +const userController = require('../controllers/user'); router.get('/', postController.index); router.get('/new-post', postController.create); router.post('/new-post', postController.store); router.get('/remove-post/:id', postController.destroy); +router.get('/register', userController.registerView); +router.get('/login', userController.loginView); + +router.post('/register', userController.register); +router.post('/login', userController.login); + +router.get('/logout', userController.logout); + module.exports = router; |