reloaded hace 5 años
padre
commit
4a55ff52b3
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      app/controller/level.js

+ 4 - 1
app/controller/level.js

@@ -7,12 +7,15 @@ const { CrudController } = require('naf-framework-mongoose/lib/controller');
 
 // 信息表管理
 class LevelController extends Controller {
-
   constructor(ctx) {
     super(ctx);
     this.service = this.ctx.service.level;
   }
 
+  async index() {
+    const res = await this.service.query(this.ctx.query);
+    this.ctx.ok({ ...res });
+  }
 }
 
 module.exports = CrudController(LevelController, meta);