liuyu 4 years ago
parent
commit
33a80d50d0
2 changed files with 7 additions and 0 deletions
  1. 6 0
      app/controller/teacher.js
  2. 1 0
      app/router.js

+ 6 - 0
app/controller/teacher.js

@@ -25,6 +25,12 @@ class TeacherController extends Controller {
     this.ctx.ok({ data: res });
   }
 
+  // 教师评分上报
+  async teaimport() {
+    const res = await this.service.teaimport(this.ctx.request.body);
+    this.ctx.ok({ msg: 'created', data: res });
+  }
+
 }
 
 module.exports = CrudController(TeacherController, meta);

+ 1 - 0
app/router.js

@@ -46,6 +46,7 @@ module.exports = app => {
     '/api/train/teacher/status',
     controller.teacher.status
   );
+  router.post('/api/train/teacher/teaimport', controller.teacher.teaimport);
 
   // 作业表配置路由
   router.resources('task', '/api/train/task', controller.task); // index、create、show、destroy