fix code scanning alerts

This commit is contained in:
undefined committed 2024-08-12 03:33:30 +08:00
1 parent 94d93d560a
commit 6c19a43bfa
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -564,7 +564,7 @@ export class ContestManagementHandler extends ContestManagementBaseHandler {
files: sortFiles(this.tdoc.files || []),
udict: await user.getListForRender(
domainId, tcdocs.map((i) => i.owner),
this.user.hasPerm(PERM.PERM_VIEW_DISPLAYNAME) ? ['displayName'] : []
this.user.hasPerm(PERM.PERM_VIEW_DISPLAYNAME) ? ['displayName'] : [],
),
tcdocs,
urlForFile: (filename: string) => this.url('contest_file_download', { tid, filename }),
@@ -673,7 +673,7 @@ export class ContestUserHandler extends ContestManagementBaseHandler {
}
const udict = await user.getListForRender(
domainId, [this.tdoc.owner, ...tsdocs.map((i) => i.uid)],
this.user.hasPerm(PERM.PERM_VIEW_DISPLAYNAME) ? ['displayName'] : []
this.user.hasPerm(PERM.PERM_VIEW_DISPLAYNAME) ? ['displayName'] : [],
);
this.response.body = { tdoc: this.tdoc, tsdocs, udict };
this.response.pjax = 'partials/contest_user.html';