core: fix problem.getList return type

This commit is contained in:
undefined committed 2024-06-13 16:32:10 +08:00
1 parent 58d0c75995
commit 0722cc9e79
1 file changed
+1 -1
+1 -1
View File
@@ -363,7 +363,7 @@ export class ProblemModel {
domainId: string, pids: number[], canViewHidden: number | boolean = false, domainId: string, pids: number[], canViewHidden: number | boolean = false,
doThrow = true, projection = ProblemModel.PROJECTION_PUBLIC, indexByDocIdOnly = false, doThrow = true, projection = ProblemModel.PROJECTION_PUBLIC, indexByDocIdOnly = false,
): Promise<ProblemDict> { ): Promise<ProblemDict> {
if (!pids?.length) return []; if (!pids?.length) return {};
const r: Record<number, ProblemDoc> = {}; const r: Record<number, ProblemDoc> = {};
const l: Record<string, ProblemDoc> = {}; const l: Record<string, ProblemDoc> = {};
const q: any = { docId: { $in: pids } }; const q: any = { docId: { $in: pids } };