mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: show accepted problems
This commit is contained in:
1 parent
06857affb1
commit
8d7a446066
7 files changed
+101
-12
No files matched your search
@@ -274,6 +274,7 @@ export class ProblemModel {
|
||||
static async getList(
|
||||
domainId: string, pids: number[],
|
||||
getHidden: number | boolean = false, doThrow = true, projection = ProblemModel.PROJECTION_PUBLIC,
|
||||
indexByDocIdOnly = false,
|
||||
): Promise<ProblemDict> {
|
||||
const r: Record<number, ProblemDoc> = {};
|
||||
const l: Record<string, ProblemDoc> = {};
|
||||
@@ -300,7 +301,7 @@ export class ProblemModel {
|
||||
}
|
||||
}
|
||||
}
|
||||
return Object.assign(r, l);
|
||||
return indexByDocIdOnly ? r : Object.assign(r, l);
|
||||
}
|
||||
|
||||
static async getPrefixList(domainId: string, prefix: string) {
|
||||
|
||||
Reference in new issue
Block a user