judge: remove useless suffix

This commit is contained in:
undefined committed 2022-09-06 13:02:46 +08:00
1 parent 805c8e4cd3
commit 7f967060cd
12 files changed
+61 -60

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ const logger = new Logger('judge');
const session = {
config: { detail: system.get('hydrojudge.detail') },
async fetchCodeFile(name: string) {
async fetchFile(name: string) {
const target = path.join('/tmp/hydro/judge', name.replace(/\//g, '_'));
await storage.get(`submission/${name}`, target);
return target;
+1 -1
View File
@@ -105,7 +105,7 @@ export default class Hydro {
return filePath;
}
async fetchCodeFile(name: string) {
async fetchFile(name: string) {
const res = await this.axios.post('judge/code', { id: name });
const f = await this.axios.get(res.data.url, { responseType: 'stream' })
.catch((e) => new Error(`DownloadFail(${name}): ${e.message}`));