mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: handle sync delay in database cluster
This commit is contained in:
4 files changed
+16
-12
No files matched your search
@@ -925,14 +925,14 @@ export class ProblemSolutionHandler extends ProblemDetailHandler {
|
||||
|
||||
@param('psid', Types.ObjectId)
|
||||
async postUpvote(domainId: string, psid: ObjectId) {
|
||||
const [psdoc, pssdoc] = await solution.vote(domainId, psid, this.user._id, 1);
|
||||
this.back({ vote: psdoc.vote, user_vote: pssdoc.vote });
|
||||
const psdoc = await solution.vote(domainId, psid, this.user._id, 1);
|
||||
this.back({ vote: psdoc.vote, user_vote: 1 });
|
||||
}
|
||||
|
||||
@param('psid', Types.ObjectId)
|
||||
async postDownvote(domainId: string, psid: ObjectId) {
|
||||
const [psdoc, pssdoc] = await solution.vote(domainId, psid, this.user._id, -1);
|
||||
this.back({ vote: psdoc.vote, user_vote: pssdoc.vote });
|
||||
const psdoc = await solution.vote(domainId, psid, this.user._id, -1);
|
||||
this.back({ vote: psdoc.vote, user_vote: -1 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user