You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
501 B
12 lines
501 B
const express = require('express');
|
|
const router = express.Router();
|
|
const resultController = require('../controllers/results');
|
|
const { protect, authorize } = require('../middlewares/auth');
|
|
|
|
router.post('/', protect, resultController.submitResult);
|
|
router.get('/my-results', protect, resultController.getUserResults);
|
|
|
|
// 以下路由需要教师或管理员权限
|
|
router.get('/exam/:id', protect, authorize('teacher', 'admin'), resultController.getExamResults);
|
|
|
|
module.exports = router; |