mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: problem_list: fix status display
This commit is contained in:
3 files changed
+6
-9
No files matched your search
@@ -156,14 +156,10 @@ export class ProblemMainHandler extends Handler {
|
||||
if (sort.length) pdocs = pdocs.sort((a, b) => sort.indexOf(`${a.domainId}/${a.docId}`) - sort.indexOf(`${b.domainId}/${b.docId}`));
|
||||
if (text && pcount > pdocs.length) pcount = pdocs.length;
|
||||
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) {
|
||||
const domainIds = Array.from(new Set(pdocs.map((i) => i.domainId)));
|
||||
await Promise.all(
|
||||
domainIds.map((did) =>
|
||||
problem.getListStatus(
|
||||
did, this.user._id,
|
||||
pdocs.filter((i) => i.domainId === did).map((i) => i.docId),
|
||||
).then((res) => Object.assign(psdict, res))),
|
||||
);
|
||||
Object.assign(psdict, await problem.getListStatus(
|
||||
domainId, this.user._id,
|
||||
pdocs.map((i) => i.docId),
|
||||
));
|
||||
}
|
||||
if (pjax) {
|
||||
this.response.body = {
|
||||
|
||||
Reference in new issue
Block a user