const express = require('express');
const router = express.Router();
const departmentController = require('../controllers/departmentController');
const { requireAuth } = require('../middleware/auth');

router.use(requireAuth);

router.get('/', departmentController.getAll);
router.get('/:id', departmentController.getById);
router.post('/', departmentController.create);
router.put('/:id', departmentController.update);
router.delete('/:id', departmentController.remove);

module.exports = router;
