|
@@ -14,21 +14,16 @@ module.exports = app => {
|
|
|
// 教师表设置路由
|
|
|
router.get('teacher', '/api/train/teacher/show/:id', controller.teacher.show);
|
|
|
router.resources('teacher', '/api/train/teacher', controller.teacher); // index、create、show、destroy
|
|
|
+ router.post('teacher', '/api/train/teacher/update/:id', controller.teacher.update);
|
|
|
router.post('teacher', '/api/train/teacher/status', controller.teacher.status);
|
|
|
|
|
|
// 作业表配置路由
|
|
|
- router.post('task', '/api/train/task', controller.task.create);
|
|
|
- router.delete('task', '/api/train/task/:id', controller.task.delete);
|
|
|
+ router.resources('task', '/api/train/task', controller.task); // index、create、show、destroy
|
|
|
router.post('task', '/api/train/task/update/:id', controller.task.update);
|
|
|
- router.get('task', '/api/train/task', controller.task.query);
|
|
|
- router.get('task', '/api/train/task/show/:id', controller.task.show);
|
|
|
|
|
|
// 问卷题库表配置路由
|
|
|
- router.post('question', '/api/train/question', controller.question.create);
|
|
|
- router.delete('question', '/api/train/question/:id', controller.question.delete);
|
|
|
+ router.resources('question', '/api/train/question', controller.question); // index、create、show、destroy
|
|
|
router.post('question', '/api/train/question/update/:id', controller.question.update);
|
|
|
- router.get('question', '/api/train/question', controller.question.query);
|
|
|
- router.get('question', '/api/train/question/show/:id', controller.question.show);
|
|
|
|
|
|
// 问卷表配置路由
|
|
|
router.post('questionnaire', '/api/train/questionnaire', controller.questionnaire.create);
|
|
@@ -85,6 +80,7 @@ module.exports = app => {
|
|
|
router.post('teaplan', '/api/train/teaplan/update/:id', controller.teaplan.update);
|
|
|
|
|
|
// 教师申请讲课表设置路由
|
|
|
+ router.get('apply', '/api/train/apply/queryteacher', controller.apply.queryteacher);
|
|
|
router.resources('apply', '/api/train/apply', controller.apply); // index、create、show、destroy
|
|
|
router.post('apply', '/api/train/apply/update/:id', controller.apply.update);
|
|
|
|