done refactoring User controller + UserModel
This commit is contained in:
parent
8f60cc1e54
commit
766b52dce1
1 changed files with 2 additions and 2 deletions
|
@ -1,12 +1,12 @@
|
||||||
import express from 'express';
|
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();
|
const userRouter = express.Router();
|
||||||
|
|
||||||
userRouter.post('/', create);
|
userRouter.post('/', create);
|
||||||
userRouter.get('/', getAll);
|
userRouter.get('/', getAll);
|
||||||
userRouter.post('/login', login);
|
userRouter.post('/login', login);
|
||||||
// userRouter.post('/logout', logout);
|
userRouter.post('/logout', logout);
|
||||||
userRouter.delete('/:id', deleteHandler)
|
userRouter.delete('/:id', deleteHandler)
|
||||||
|
|
||||||
export default userRouter;
|
export default userRouter;
|
Loading…
Reference in a new issue