mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix discussion.problem relation
This commit is contained in:
1 parent
86379f4ace
commit
2f66bbfabd
3 files changed
+16
-2
No files matched your search
@@ -250,7 +250,7 @@ export async function getVnode(domainId: string, type: number, id: string, uid?:
|
||||
if (type === document.TYPE_PROBLEM) {
|
||||
const pdoc = await problem.get(domainId, Number.isSafeInteger(+id) ? +id : id);
|
||||
if (!pdoc) throw new DiscussionNodeNotFoundError(id);
|
||||
return { ...pdoc, type, id };
|
||||
return { ...pdoc, type, id: pdoc.docId };
|
||||
}
|
||||
if ([document.TYPE_CONTEST, document.TYPE_TRAINING, document.TYPE_HOMEWORK].includes(type as any)) {
|
||||
const model = type === document.TYPE_TRAINING ? training : contest;
|
||||
|
||||
Reference in new issue
Block a user