ADD file via upload

main
phgkfux43 4 months ago
parent b0256e4e9f
commit 7f0c51024e

@ -0,0 +1,13 @@
const express = require('express');
const router = express.Router();
const examController = require('../controllers/exams');
const { protect, authorize } = require('../middlewares/auth');
router.get('/', examController.getExams);
router.get('/:id', examController.getExam);
router.post('/:id/validate', protect, examController.validateAnswers);
// 以下路由需要教师或管理员权限
router.post('/', protect, authorize('teacher', 'admin'), examController.createExam);
module.exports = router;
Loading…
Cancel
Save