mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
1 parent
d5c5b3fd47
commit
1c89596cb3
20 files changed
+84
-59
No files matched your search
@@ -11,6 +11,7 @@ import {
|
||||
import paginate from '../lib/paginate';
|
||||
import { isPid } from '../lib/validator';
|
||||
import difficultyAlgorithm from '../lib/difficulty';
|
||||
import { parseConfig } from '../lib/testdataConfig';
|
||||
import * as system from '../model/system';
|
||||
import problem from '../model/problem';
|
||||
import record from '../model/record';
|
||||
@@ -189,6 +190,12 @@ export class ProblemDetailHandler extends ProblemHandler {
|
||||
// e.g.  will navigate to 
|
||||
this.response.body.pdoc.content = this.response.body.pdoc.content
|
||||
.replace(/\(file:\/\//g, `(./${this.pdoc.docId}/file/`);
|
||||
// Get time and memory limit
|
||||
try {
|
||||
this.response.body.pdoc.config = await parseConfig(this.pdoc.config);
|
||||
} catch (e) {
|
||||
this.response.body.pdoc.config = `Cannot parse: ${e.message}`;
|
||||
}
|
||||
}
|
||||
|
||||
@param('pid', Types.UnsignedInt)
|
||||
|
||||
Reference in new issue
Block a user