core: fix solution.getListStatus

This commit is contained in:
undefined committed 2021-05-03 17:30:49 +08:00
1 parent d9a65aa8cb
commit 9bfa60169b
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "hydrooj", "name": "hydrooj",
"version": "2.24.1", "version": "2.24.2",
"bin": "bin/hydrooj.js", "bin": "bin/hydrooj.js",
"main": "dist/loader.js", "main": "dist/loader.js",
"typings": "dist/loader.d.ts", "typings": "dist/loader.d.ts",
+1 -1
View File
@@ -473,7 +473,7 @@ export class ProblemSolutionHandler extends ProblemDetailHandler {
} }
} }
const udict = await user.getList(domainId, uids); const udict = await user.getList(domainId, uids);
const pssdict = solution.getListStatus(domainId, docids, this.user._id); const pssdict = await solution.getListStatus(domainId, docids, this.user._id);
const path = [ const path = [
['problem_main', 'problem_main'], ['problem_main', 'problem_main'],
[this.pdoc.title, 'problem_detail', { pid: this.pdoc.pid || this.pdoc.docId }, true], [this.pdoc.title, 'problem_detail', { pid: this.pdoc.pid || this.pdoc.docId }, true],
+1 -1
View File
@@ -72,7 +72,7 @@ class SolutionModel {
} }
static async getListStatus(domainId: string, psids: ObjectID[], uid: number) { static async getListStatus(domainId: string, psids: ObjectID[], uid: number) {
const result = {}; const result: any = {};
const res = await document.getMultiStatus( const res = await document.getMultiStatus(
domainId, document.TYPE_PROBLEM_SOLUTION, { uid, psid: { $in: psids } }, domainId, document.TYPE_PROBLEM_SOLUTION, { uid, psid: { $in: psids } },
).toArray(); ).toArray();