import express, { type Request, type Response } from "express"; import userController from '../controllers/userController'; import checkAuthenticated from '../miscellaneous/checkAuthenticated'; const router = express.Router(); /* 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;