mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
f
This commit is contained in:
1 parent
252a251ce4
commit
ba94c59e3f
2 files changed
+8
-3
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.15.12",
|
||||
"version": "2.15.13",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -194,8 +194,13 @@ export class ProblemDetailHandler extends ProblemHandler {
|
||||
async get(..._args: any[]) {
|
||||
// Navigate to current additional file download
|
||||
// e.g.  will navigate to 
|
||||
this.response.body.pdoc.content = this.response.body.pdoc.content
|
||||
.replace(/\(file:\/\//g, `(./${this.pdoc.docId}/file/`);
|
||||
if (typeof this.response.body.pdoc.content === 'string') {
|
||||
this.response.body.pdoc.content = this.response.body.pdoc.content
|
||||
.replace(/\(file:\/\//g, `(./${this.pdoc.docId}/file/`);
|
||||
} else {
|
||||
this.response.body.pdoc.content = JSON.parse(JSON.stringify(this.response.body.pdoc.content)
|
||||
.replace(/\(file:\/\//g, `(./${this.pdoc.docId}/file/`));
|
||||
}
|
||||
}
|
||||
|
||||
@param('pid', Types.UnsignedInt)
|
||||
|
||||
Reference in new issue
Block a user