const router = require('express').Router();
const { authMiddleware } = require('../middleware/auth');
const ctrl = require('../controllers/bookmarkController');

router.use(authMiddleware);

router.get('/',                          ctrl.list);
router.post('/',                         ctrl.add);
router.delete('/:id',                    ctrl.remove);
router.delete('/entity/:type/:entityId', ctrl.removeByEntity);
router.get('/check/:type/:entityId',     ctrl.check);

module.exports = router;
