From 376fae2a3367d5813d088a29c5a62938bd55f762 Mon Sep 17 00:00:00 2001 From: Mateja Date: Thu, 6 May 2021 21:07:24 +0200 Subject: Boilerplate for login system. --- routes/web.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'routes') 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; -- cgit v1.2.3