done refactoring User controller + UserModel

This commit is contained in:
Kfir Dayan 2023-06-21 14:44:26 +03:00
parent 8f60cc1e54
commit 766b52dce1

View file

@ -1,12 +1,12 @@
import express from 'express';
import { create, login, getAll, deleteHandler } from '../controllers/userController';
import { create, login, logout, getAll, deleteHandler } from '../controllers/userController';
const userRouter = express.Router();
userRouter.post('/', create);
userRouter.get('/', getAll);
userRouter.post('/login', login);
// userRouter.post('/logout', logout);
userRouter.post('/logout', logout);
userRouter.delete('/:id', deleteHandler)
export default userRouter;