修复题目列表分页异常

This commit is contained in:
masnn committed 2020-05-17 20:20:07 +08:00
1 parent 9e5d3dea89
commit cbcf9ebbc2
5 files changed
+118 -35

No files matched your search

+2 -2
View File
@@ -34,7 +34,7 @@ class ProblemHandler extends Handler {
let psdict = {};
if (category) q.category = category;
if (!this.user.hasPerm(PERM_VIEW_PROBLEM_HIDDEN)) q.hidden = false;
const [pdocs, pcount] = await paginate(
const [pdocs, ppcount, pcount] = await paginate(
problem.getMulti(q).sort({ pid: 1 }),
page,
await system.get('PROBLEM_PER_PAGE'),
@@ -47,7 +47,7 @@ class ProblemHandler extends Handler {
['problem_main', null],
];
this.response.body = {
path, page, pcount, pdocs, psdict, category,
path, page, pcount, ppcount, pdocs, psdict, category,
};
}
}