const auth = require('../auth') const express = require('express') const Top5ListController = require('../controllers/top5list-controller') const UserController = require('../controllers/user-controller') const router = express.Router() router.post('/top5list', auth.verify, Top5ListController.createTop5List) router.put('/top5list/:id', auth.verify, Top5ListController.updateTop5List) router.put('/publishtop5list/:id', auth.verify, Top5ListController.publishTop5List) router.delete('/top5list/:id', auth.verify, Top5ListController.deleteTop5List) router.get('/top5list/:id', Top5ListController.getTop5ListById) //router.get('/top5lists', auth.verify, Top5ListController.getTop5Lists) router.get('/top5lists', Top5ListController.getTop5Lists) router.get('/communitylists', Top5ListController.getCommunityLists) router.get('/communitylist/:id', Top5ListController.getCommunityListById) router.get('/top5listviews/:id', Top5ListController.updateTop5ListViews) router.get('/top5listlikes/:id', auth.verify, Top5ListController.updateTop5ListLikes) router.get('/top5listdislikes/:id', auth.verify, Top5ListController.updateTop5ListDislikes) router.get('/communitylistviews/:id', Top5ListController.updateCommunityListViews) router.get('/communitylistlikes/:id', auth.verify, Top5ListController.updateCommunityListLikes) router.get('/communitylistdislikes/:id', auth.verify, Top5ListController.updateCommunityListDislikes) router.put('/commenttop5list/:id', auth.verify, Top5ListController.updateTop5ListComments) router.put('/commentcommunitylist/:id', auth.verify, Top5ListController.updateCommunityListComments) router.post('/register', UserController.registerUser) router.post('/login', UserController.loginUser) router.get('/logout', UserController.logoutUser) router.get('/loggedIn', UserController.getLoggedIn) module.exports = router