From 4f1128fd2b188e9c68236c849ad1f3acb9432968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 2 May 2020 13:34:19 -0400 Subject: [PATCH] fix: add missing await --- src/posts/votes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);