Browse Source

将students改为data

reloaded 5 năm trước cách đây
mục cha
commit
d806301b95
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      app/service/student.js

+ 3 - 3
app/service/student.js

@@ -15,9 +15,9 @@ class StudentService extends CrudService {
 
   // 查询
   async seek({ termid, skip, limit }) {
-    const students = await this.model.find({ termid, classid: null }).skip(Number(skip)).limit(Number(limit));
-    const total = await students.length;
-    const result = { total, students };
+    const data = await this.model.find({ termid, classid: null }).skip(Number(skip)).limit(Number(limit));
+    const total = await data.length;
+    const result = { total, data };
     return result;
   }