mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
core&judge&ui: hack submission
This commit is contained in:
1 parent
07ab4f1bbd
commit
4e0c9bb00a
17 files changed
+256
-128
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user