core: export drid and psid

This commit is contained in:
undefined committed 2022-08-30 01:33:51 +08:00
1 parent 1ff3e2b49e
commit 9e19eb2614
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -245,8 +245,8 @@ class DiscussionDetailHandler extends DiscussionHandler {
for (const uid of uids) {
message.send(1, uid, msg, message.FLAG_RICHTEXT | message.FLAG_UNREAD);
}
await discussion.addReply(domainId, did, this.user._id, content, this.request.ip);
this.back();
const drid = await discussion.addReply(domainId, did, this.user._id, content, this.request.ip);
this.back({ drid });
}
@param('drid', Types.ObjectID)
+2 -2
View File
@@ -776,8 +776,8 @@ export class ProblemSolutionHandler extends ProblemDetailHandler {
@param('content', Types.Content)
async postSubmit(domainId: string, content: string) {
this.checkPerm(PERM.PERM_CREATE_PROBLEM_SOLUTION);
await solution.add(domainId, this.pdoc.docId, this.user._id, content);
this.back();
const psid = await solution.add(domainId, this.pdoc.docId, this.user._id, content);
this.back({ psid });
}
@param('content', Types.Content)