core: deprecate ProblemModel.list

This commit is contained in:
undefined committed 2024-10-22 10:28:00 +08:00
1 parent 7d9df55d09
commit eb26feb655
3 files changed
+7 -5

No files matched your search

+3 -3
View File
@@ -142,9 +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,
: 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;