reloaded 4 gadi atpakaļ
vecāks
revīzija
2b0a90dccc
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  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);