judge: fix readCases with limits

This commit is contained in:
undefined committed 2021-04-18 21:35:36 +08:00
1 parent bee8537a91
commit 04a68e35bd
4 files changed
+17 -17

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.23.2",
"version": "2.23.3",
"bin": "bin/hydrooj.js",
"main": "dist/loader.js",
"typings": "dist/loader.d.ts",
+6 -6
View File
@@ -186,6 +186,12 @@ export class ProblemDetailHandler extends ProblemHandler {
],
};
this.extraTitleContent = this.pdoc.title;
// 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}`;
}
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -194,12 +200,6 @@ export class ProblemDetailHandler extends ProblemHandler {
// e.g. ![img](a.jpg) will navigate to ![img](./pid/file/a.jpg)
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}`;
}
if (this.pdoc.psdoc) {
this.response.body.rdoc = await record.get(this.domainId, this.pdoc.psdoc.rid);
}