diff options
| author | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2017-04-14 20:45:37 +0900 |
|---|---|---|
| committer | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2017-04-14 20:45:37 +0900 |
| commit | b095efaee59572800244b34564692fd999cc4ded (patch) | |
| tree | 89a2a1401b2af797bb687d0d79cfb5e9e52d987e /src/api/endpoints/posts/reactions | |
| parent | Fix tslint.json (diff) | |
| download | misskey-b095efaee59572800244b34564692fd999cc4ded.tar.gz misskey-b095efaee59572800244b34564692fd999cc4ded.tar.bz2 misskey-b095efaee59572800244b34564692fd999cc4ded.zip | |
Migrate to tslint 5.1.0
Diffstat (limited to 'src/api/endpoints/posts/reactions')
| -rw-r--r-- | src/api/endpoints/posts/reactions/create.ts | 2 | ||||
| -rw-r--r-- | src/api/endpoints/posts/reactions/delete.ts | 10 |
2 files changed, 6 insertions, 6 deletions
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 }, { |