diff options
Diffstat (limited to 'src/api/endpoints/posts/reactions/delete.ts')
| -rw-r--r-- | src/api/endpoints/posts/reactions/delete.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/api/endpoints/posts/reactions/delete.ts b/src/api/endpoints/posts/reactions/delete.ts index 89f6beb103..922c57ab18 100644 --- a/src/api/endpoints/posts/reactions/delete.ts +++ b/src/api/endpoints/posts/reactions/delete.ts @@ -42,16 +42,16 @@ module.exports = (params, user) => new Promise(async (res, rej) => { await Reaction.update({ _id: exist._id }, { - $set: { - deleted_at: new Date() - } - }); + $set: { + deleted_at: new Date() + } + }); // Send response res(); const dec = {}; - dec['reaction_counts.' + exist.reaction] = -1; + dec[`reaction_counts.${exist.reaction}`] = -1; // Decrement reactions count Post.update({ _id: post._id }, { |