reloaded 4 年之前
父節點
當前提交
2b0a90dccc
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      app/controller/group.js

+ 5 - 0
app/controller/group.js

@@ -31,6 +31,11 @@ class GroupController extends Controller {
     const res = await this.service.findbystuid(this.ctx.request.body);
     this.ctx.ok({ msg: 'ok', data: res });
   }
+
+  async index() {
+    const data = await this.service.query(this.ctx.query);
+    this.ctx.ok({ ...data });
+  }
 }
 
 module.exports = CrudController(GroupController, meta);