mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: add history on discussion create
This commit is contained in:
1 parent
a364519a2e
commit
78e75ce8b7
1 file changed
+3
@@ -69,6 +69,9 @@ export async function add(
|
||||
payload.domainId!, payload.content!, payload.owner!, document.TYPE_DISCUSSION,
|
||||
null, payload.parentType, payload.parentId, omit(payload, ['domainId', 'content', 'owner', 'parentType', 'parentId']),
|
||||
);
|
||||
await coll.insertOne({
|
||||
domainId, docId: res, content, uid: owner, ip, time: new Date(),
|
||||
});
|
||||
payload.docId = res;
|
||||
await bus.parallel('discussion/add', payload);
|
||||
return payload.docId;
|
||||
|
||||
Reference in new issue
Block a user