Skip to content

Commit

Permalink
changed routers
Browse files Browse the repository at this point in the history
  • Loading branch information
codewith-zach committed Aug 25, 2022
1 parent c8a7ea7 commit 55ae024
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions api/users/user.router.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ const { checkToken } = require('../../auth/token_validation');


//Now we have to define the route for all the controllers
router.post('/createVisitors', checkToken, createVisitors); //we are passing the request to 'creatUser' in the user.controller
router.get('/getVisitors', checkToken, getVisitors);
router.get('/getVisitorsByVisitorId:id', checkToken, getVisitorsByVisitorId);
router.patch('/updateVisitors', checkToken, updateVisitors);
router.delete('/deleteVisitors', checkToken, deleteVisitors);
router.get('/getUserByUserId:id', checkToken, getUserByUserId);
router.patch('/updateUsers', checkToken, updateUser);
router.delete('/deleteUser', checkToken, deleteUser);
router.post('/visitor/createVisitors', checkToken, createVisitors); //we are passing the request to 'creatUser' in the user.controller
router.get('/visitor/getVisitors', checkToken, getVisitors);
router.get('/visitor/getVisitorsByVisitorId:id', checkToken, getVisitorsByVisitorId);
router.patch('/visitor/updateVisitors', checkToken, updateVisitors);
router.delete('/visitor/deleteVisitors', checkToken, deleteVisitors);
router.get('/user/getUserByUserId:id', checkToken, getUserByUserId);
router.patch('/user/updateUsers', checkToken, updateUser);
router.delete('/user/deleteUser', checkToken, deleteUser);
router.post('/user/login', login); //used for login
router.get('/user/getUsers', getUsers);
router.post('/user/createUsers', createUsers);
Expand Down

0 comments on commit 55ae024

Please sign in to comment.