mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
修复题目列表分页异常
This commit is contained in:
1 parent
9e5d3dea89
commit
cbcf9ebbc2
5 files changed
+118
-35
No files matched your search
@@ -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,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user