import express, { type Request, type Response } from "express";
var router = express.Router();
import userController from '../controllers/userController';

import checkAuthenticated from '../miscellaneous/checkAuthenticated';

/* GET home page. */
router.get('/', function (req: Request, res: Response) {
  res.render('user', { title: 'Register' });
});

router.post('/', userController.create);

router.delete('/', checkAuthenticated, userController.remove);

router.put('/', checkAuthenticated, userController.get);

export default router;