mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
fix code scanning alerts
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -564,7 +564,7 @@ export class ContestManagementHandler extends ContestManagementBaseHandler {
|
|||||||
files: sortFiles(this.tdoc.files || []),
|
files: sortFiles(this.tdoc.files || []),
|
||||||
udict: await user.getListForRender(
|
udict: await user.getListForRender(
|
||||||
domainId, tcdocs.map((i) => i.owner),
|
domainId, tcdocs.map((i) => i.owner),
|
||||||
this.user.hasPerm(PERM.PERM_VIEW_DISPLAYNAME) ? ['displayName'] : []
|
this.user.hasPerm(PERM.PERM_VIEW_DISPLAYNAME) ? ['displayName'] : [],
|
||||||
),
|
),
|
||||||
tcdocs,
|
tcdocs,
|
||||||
urlForFile: (filename: string) => this.url('contest_file_download', { tid, filename }),
|
urlForFile: (filename: string) => this.url('contest_file_download', { tid, filename }),
|
||||||
@@ -673,7 +673,7 @@ export class ContestUserHandler extends ContestManagementBaseHandler {
|
|||||||
}
|
}
|
||||||
const udict = await user.getListForRender(
|
const udict = await user.getListForRender(
|
||||||
domainId, [this.tdoc.owner, ...tsdocs.map((i) => i.uid)],
|
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.body = { tdoc: this.tdoc, tsdocs, udict };
|
||||||
this.response.pjax = 'partials/contest_user.html';
|
this.response.pjax = 'partials/contest_user.html';
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ process.stdin.on('data', (buf) => {
|
|||||||
} else executeCommand(input);
|
} else executeCommand(input);
|
||||||
});
|
});
|
||||||
|
|
||||||
export const useReadline = (callback: (string) => any) => {
|
export const useReadline = (callback: (str: string) => any) => {
|
||||||
if (readlineCallback) throw new Error('Already waiting for input.');
|
if (readlineCallback) throw new Error('Already waiting for input.');
|
||||||
readlineCallback = callback;
|
readlineCallback = callback;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user