var express = require('express'); var router = express.Router(); var userController = require('../controllers/userController.js'); const checkAuthenticated = require('../miscellaneous/checkAuthenticated.js').default; /* GET home page. */ router.get('/', function (req, res, next) { res.render('user', { title: 'Register' }); }); router.post('/', userController.create); router.delete('/', checkAuthenticated, userController.remove); router.put('/', checkAuthenticated, userController.get); module.exports = router;