mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-06 12:45:22 +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 result = await this.Model.listWithPaging(group_id, page, limit);
|
||||||
let count = await this.Model.listCount();
|
let count = await this.Model.listCount();
|
||||||
ctx.body = yapi.commons.resReturn({
|
ctx.body = yapi.commons.resReturn({
|
||||||
total: count,
|
total: Math.ceil(count / limit),
|
||||||
list: result
|
list: result
|
||||||
})
|
})
|
||||||
}catch(err){
|
}catch(err){
|
||||||
|
@ -305,7 +305,7 @@ class userController extends baseController {
|
|||||||
let user = await userInst.listWithPaging(page, limit);
|
let user = await userInst.listWithPaging(page, limit);
|
||||||
let count = await userInst.listCount();
|
let count = await userInst.listCount();
|
||||||
return ctx.body = yapi.commons.resReturn({
|
return ctx.body = yapi.commons.resReturn({
|
||||||
total: count,
|
total: Math.ceil(count / limit),
|
||||||
list: user
|
list: user
|
||||||
});
|
});
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
@ -608,7 +608,7 @@ var projectController = function (_baseController) {
|
|||||||
count = _context6.sent;
|
count = _context6.sent;
|
||||||
|
|
||||||
ctx.body = _yapi2.default.commons.resReturn({
|
ctx.body = _yapi2.default.commons.resReturn({
|
||||||
total: count,
|
total: Math.ceil(count / limit),
|
||||||
list: result
|
list: result
|
||||||
});
|
});
|
||||||
_context6.next = 16;
|
_context6.next = 16;
|
||||||
|
@ -666,7 +666,7 @@ var userController = function (_baseController) {
|
|||||||
case 8:
|
case 8:
|
||||||
count = _context9.sent;
|
count = _context9.sent;
|
||||||
return _context9.abrupt('return', ctx.body = _yapi2.default.commons.resReturn({
|
return _context9.abrupt('return', ctx.body = _yapi2.default.commons.resReturn({
|
||||||
total: count,
|
total: Math.ceil(count / limit),
|
||||||
list: user
|
list: user
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user