mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
Merge pull request #887 from hydro-dev/remove-union
This commit is contained in:
12 files changed
+88
-108
No files matched your search
@@ -142,10 +142,9 @@ export class ProblemMainHandler extends Handler {
|
||||
// eslint-disable-next-line prefer-const
|
||||
let [pdocs, ppcount, pcount] = this.queryContext.fail
|
||||
? [[], 0, 0]
|
||||
: await problem.list(
|
||||
domainId, query, sort.length ? 1 : page, limit,
|
||||
quick ? ['title', 'pid', 'domainId', 'docId'] : undefined,
|
||||
this.user._id,
|
||||
: await this.paginate(
|
||||
problem.getMulti(domainId, query, quick ? ['title', 'pid', 'domainId', 'docId'] : undefined).sort({ sort: 1, docId: 1 }),
|
||||
sort.length ? 1 : page, limit,
|
||||
);
|
||||
if (total) {
|
||||
pcount = total;
|
||||
|
||||
Reference in new issue
Block a user