2024-07-16 14:24:01 +02:00

17 lines
521 B
JavaScript

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;