const express = require('express');
const {
  getMedicalReports,
  createMedicalReport,
} = require('../controllers/medicalReportController');
const { protect } = require('../middleware/auth');
const { requireRole } = require('../middleware/role');

const router = express.Router();

router.use(protect);

router.get('/', getMedicalReports);
router.post('/', requireRole('doctor'), createMedicalReport);

module.exports = router;
