mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: fix problem add with difficulty (#683)
This commit is contained in:
1 parent
21ff3ce8f5
commit
bc4f5115d2
1 file changed
+1
@@ -140,6 +140,7 @@ export class ProblemModel {
|
||||
title, tag, hidden: meta.hidden || false, nSubmit: 0, nAccept: 0, sort: sortable(pid || `P${docId}`),
|
||||
};
|
||||
if (pid) args.pid = pid;
|
||||
if (meta.difficulty) args.difficulty = meta.difficulty;
|
||||
await bus.parallel('problem/before-add', domainId, content, owner, docId, args);
|
||||
const result = await document.add(domainId, content, owner, document.TYPE_PROBLEM, docId, null, null, args);
|
||||
args.content = content;
|
||||
|
||||
Reference in new issue
Block a user