From b095efaee59572800244b34564692fd999cc4ded Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Fri, 14 Apr 2017 20:45:37 +0900 Subject: Migrate to tslint 5.1.0 --- src/api/endpoints/posts/reactions/create.ts | 2 +- src/api/endpoints/posts/reactions/delete.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/api/endpoints/posts/reactions') diff --git a/src/api/endpoints/posts/reactions/create.ts b/src/api/endpoints/posts/reactions/create.ts index 5425eaea02..a3b25baa6a 100644 --- a/src/api/endpoints/posts/reactions/create.ts +++ b/src/api/endpoints/posts/reactions/create.ts @@ -67,7 +67,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => { res(); const inc = {}; - inc['reaction_counts.' + reaction] = 1; + inc[`reaction_counts.${reaction}`] = 1; // Increment reactions count await Post.update({ _id: post._id }, { 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 }, { -- cgit v1.2.3-freya