const express = require('express');
const router = express.Router();
const { protect, admin } = require('../middleware/auth');
const {
  addPosition,
  getPositions,
  updatePosition,
  deletePosition,
} = require('../controllers/positionController');

router.use(protect);
router.post('/add', admin, addPosition);
router.get('/list', getPositions);
router.put('/:id', admin, updatePosition);
router.delete('/:id', admin, deletePosition);

module.exports = router;
