mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: fix user_detail
This commit is contained in:
1 parent
0300262b73
commit
fcfc93a40a
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "3.2.12",
|
||||
"version": "3.2.13",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -297,7 +297,7 @@ class UserDetailHandler extends Handler {
|
||||
const pdocs: ProblemDoc[] = [];
|
||||
const acInfo: Record<string, number> = {};
|
||||
const canViewHidden = this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN) || this.user._id;
|
||||
await Promise.all([domainId, ...union.union].map(async (did) => {
|
||||
await Promise.all([domainId, ...(union?.union || [])].map(async (did) => {
|
||||
const psdocs = await problem.getMultiStatus(did, { uid, status: STATUS.STATUS_ACCEPTED }).toArray();
|
||||
pdocs.push(...Object.values(await problem.getList(did, psdocs.map((i) => i.docId), canViewHidden, false, undefined, true)));
|
||||
}));
|
||||
|
||||
Reference in new issue
Block a user