uploadtask.js 552 B

123456789101112131415161718192021222324
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.uploadtask.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 学生上传作业管理
  7. class UploadtaskController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.uploadtask;
  11. }
  12. async index() {
  13. const res = await this.service.query(this.ctx.query);
  14. this.ctx.ok({ ...res });
  15. }
  16. }
  17. module.exports = CrudController(UploadtaskController, meta);