mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: export problem difficulty info
This commit is contained in:
4 files changed
+21
-8
No files matched your search
@@ -90,7 +90,7 @@ class AccountService {
|
||||
try {
|
||||
const res = await this.api.getProblem(pid, meta);
|
||||
if (!res) continue;
|
||||
const docId = await ProblemModel.add(domainId, pid, res.title, res.content, 1, res.tag, false);
|
||||
const docId = await ProblemModel.add(domainId, pid, res.title, res.content, 1, res.tag);
|
||||
if (res.difficulty) await ProblemModel.edit(domainId, docId, { difficulty: res.difficulty });
|
||||
for (const key in res.files) {
|
||||
await ProblemModel.addAdditionalFile(domainId, docId, key, res.files[key]);
|
||||
|
||||
Reference in new issue
Block a user