import { Router } from 'express';
import * as instrumentController from '../controllers/instrumentController.js';
import { extractUser, requireAdmin } from '../middleware/roleMiddleware.js';

const router = Router();

router.post('/', extractUser, requireAdmin, instrumentController.createInstrument);
router.get('/', extractUser, instrumentController.getInstruments);
router.put('/:id', extractUser, requireAdmin, instrumentController.updateInstrument);
router.delete('/:id', extractUser, requireAdmin, instrumentController.deleteInstrument);

export default router;
