core: export problem difficulty info

This commit is contained in:
undefined committed 2023-07-11 16:27:56 +08:00
1 parent df94e5096f
commit 05222e67f1
4 files changed
+21 -8

No files matched your search

+1 -1
View File
@@ -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]);