mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
judge: remove useless suffix
This commit is contained in:
1 parent
805c8e4cd3
commit
7f967060cd
12 files changed
+61
-60
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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}`));
|
||||
|
||||
Reference in new issue
Block a user