Skip to content

Node.js based forum software built for the modern web

fix: add missing await

Barış Soner Uşaklı4f1128fd2b18
diff --git a/src/posts/votes.js b/src/posts/votes.js
index 38f2346163..ed3d1f58c6 100644
--- a/src/posts/votes.js
+++ b/src/posts/votes.js
@@ -179,7 +179,7 @@ module.exports = function (Posts) {
}
const postData = await Posts.getPostFields(pid, ['pid', 'uid', 'tid']);
- const newReputation = user.incrementUserReputationBy(postData.uid, type === 'upvote' ? 1 : -1);
+ const newReputation = await user.incrementUserReputationBy(postData.uid, type === 'upvote' ? 1 : -1);
await adjustPostVotes(postData, uid, type, unvote);