mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
codeql: remove some useless check
This commit is contained in:
1 parent
8c6f9a3b71
commit
07d7a38a1b
7 files changed
+18
-23
No files matched your search
@@ -114,7 +114,7 @@ class ProblemImportSYZOJHandler extends Handler {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await problem.addTestdata(domainId, docId, entry.entryName, entry.getData());
|
||||
}
|
||||
const filename = p.file_io_input_name ? p.file_io_input_name?.split('.')[0] : null;
|
||||
const filename = p.file_io_input_name ? p.file_io_input_name.split('.')[0] : null;
|
||||
const config = {
|
||||
time: `${p.time_limit}ms`,
|
||||
memory: `${p.memory_limit}m`,
|
||||
|
||||
@@ -128,7 +128,6 @@ export class ProblemReceiveHandler extends Handler {
|
||||
pids: filterPid.length ? filterPid.map((i) => (+i ? +i : i)) : data.pids,
|
||||
}).catch(logAndReturn(logger));
|
||||
if (res instanceof Error) throw new RemoteOnlineJudgeError(res.message);
|
||||
const tasks = [];
|
||||
const pids = [];
|
||||
const { pdocs } = res.body;
|
||||
const files = res.body.links;
|
||||
@@ -142,7 +141,7 @@ export class ProblemReceiveHandler extends Handler {
|
||||
}
|
||||
const pid = await problem.add(domainId, pdoc.pid, pdoc.title, pdoc.content, this.user._id, pdoc.tag, pdoc.category);
|
||||
pids.push(pid);
|
||||
tasks.push(this.syncFiles(domainId, baseUrl, pid, files[i]));
|
||||
this.syncFiles(domainId, baseUrl, pid, files[i]).catch(logAndReturn(logger));
|
||||
await problem.edit(domainId, pid, { html: pdoc.html });
|
||||
}
|
||||
this.back();
|
||||
|
||||
Reference in new issue
Block a user