summaryrefslogtreecommitdiff
path: root/src/api/endpoints/posts/likes/create.js
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-01-17 11:11:22 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-01-17 11:11:22 +0900
commit9f81288fccdbaf9184d49e61680747945b34f23d (patch)
treedce25db34136ffd9c05852ed4c2c493c23c96c07 /src/api/endpoints/posts/likes/create.js
parentFix bug (diff)
downloadmisskey-9f81288fccdbaf9184d49e61680747945b34f23d.tar.gz
misskey-9f81288fccdbaf9184d49e61680747945b34f23d.tar.bz2
misskey-9f81288fccdbaf9184d49e61680747945b34f23d.zip
Fix bug
Diffstat (limited to 'src/api/endpoints/posts/likes/create.js')
-rw-r--r--src/api/endpoints/posts/likes/create.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/endpoints/posts/likes/create.js b/src/api/endpoints/posts/likes/create.js
index eb35c1e4b0..73054be875 100644
--- a/src/api/endpoints/posts/likes/create.js
+++ b/src/api/endpoints/posts/likes/create.js
@@ -66,21 +66,21 @@ module.exports = (params, user) =>
res();
// Increment likes count
- Post.updateOne({ _id: post._id }, {
+ Post.update({ _id: post._id }, {
$inc: {
likes_count: 1
}
});
// Increment user likes count
- User.updateOne({ _id: user._id }, {
+ User.update({ _id: user._id }, {
$inc: {
likes_count: 1
}
});
// Increment user liked count
- User.updateOne({ _id: post.user_id }, {
+ User.update({ _id: post.user_id }, {
$inc: {
liked_count: 1
}