mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
74f034edcd
@ -229,7 +229,7 @@ class projectController extends baseController {
|
||||
let result = await this.Model.listWithPaging(group_id, page, limit);
|
||||
let count = await this.Model.listCount();
|
||||
ctx.body = yapi.commons.resReturn({
|
||||
total: count,
|
||||
total: Math.ceil(count / limit),
|
||||
list: result
|
||||
})
|
||||
}catch(err){
|
||||
|
@ -305,7 +305,7 @@ class userController extends baseController {
|
||||
let user = await userInst.listWithPaging(page, limit);
|
||||
let count = await userInst.listCount();
|
||||
return ctx.body = yapi.commons.resReturn({
|
||||
total: count,
|
||||
total: Math.ceil(count / limit),
|
||||
list: user
|
||||
});
|
||||
} catch(e) {
|
||||
|
@ -608,7 +608,7 @@ var projectController = function (_baseController) {
|
||||
count = _context6.sent;
|
||||
|
||||
ctx.body = _yapi2.default.commons.resReturn({
|
||||
total: count,
|
||||
total: Math.ceil(count / limit),
|
||||
list: result
|
||||
});
|
||||
_context6.next = 16;
|
||||
|
@ -666,7 +666,7 @@ var userController = function (_baseController) {
|
||||
case 8:
|
||||
count = _context9.sent;
|
||||
return _context9.abrupt('return', ctx.body = _yapi2.default.commons.resReturn({
|
||||
total: count,
|
||||
total: Math.ceil(count / limit),
|
||||
list: user
|
||||
}));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user