mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: update contentType for import
This commit is contained in:
1 parent
4904b16fa5
commit
e701807cbc
7 files changed
+23
-19
No files matched your search
@@ -96,7 +96,7 @@ class ProblemImportSYZOJHandler extends Handler {
|
||||
});
|
||||
}
|
||||
const docId = await problem.add(
|
||||
domainId, target, p.title, content, this.user._id, p.tags || [], hidden,
|
||||
domainId, target, p.title, JSON.stringify(content), this.user._id, p.tags || [], hidden,
|
||||
);
|
||||
const r = download(`${url}testdata/download`);
|
||||
const file = path.resolve(os.tmpdir(), 'hydro', `import_${domainId}_${docId}.zip`);
|
||||
@@ -172,7 +172,7 @@ class ProblemImportSYZOJHandler extends Handler {
|
||||
...result.body.localizedContentsOfAllLocales,
|
||||
][0].title;
|
||||
const docId = await problem.add(
|
||||
domainId, target, title, content, this.user._id, tags || [], hidden,
|
||||
domainId, target, title, JSON.stringify(content), this.user._id, tags || [], hidden,
|
||||
);
|
||||
const syncFiles = async () => {
|
||||
const judge = result.body.judgeInfo;
|
||||
|
||||
Reference in new issue
Block a user