Fix bug
This commit is contained in:
parent
caa8aee7a0
commit
9f81288fcc
48 changed files with 91 additions and 140 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue