core&judge&ui: hack submission

This commit is contained in:
undefined committed 2022-09-06 13:02:46 +08:00
1 parent 07ab4f1bbd
commit 4e0c9bb00a
17 files changed
+256 -128

No files matched your search

+1
View File
@@ -20,6 +20,7 @@ const logger = new Logger('judge');
const session = {
config: { detail: system.get('hydrojudge.detail') },
async fetchFile(name: string) {
name = name.split('#')[0];
const target = path.join('/tmp/hydro/judge', name.replace(/\//g, '_'));
await storage.get(`submission/${name}`, target);
return target;
+1
View File
@@ -110,6 +110,7 @@ export default class Hydro {
}
async fetchFile(name: string) {
name = name.split('#')[0];
const res = await this.post('judge/code', { id: name });
const target = path.join('/tmp/hydro/judge', name.replace(/\//g, '_'));
const w = fs.createWriteStream(target);