mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix solution.getListStatus
This commit is contained in:
1 parent
d9a65aa8cb
commit
9bfa60169b
3 files changed
+3
-3
No files matched your search
@@ -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",
|
||||||
|
|||||||
@@ -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],
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in new issue
Block a user