diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-03 17:24:28 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-03 17:24:28 +0900 |
| commit | 76efc039632043514ad55feec8448f073835cfc7 (patch) | |
| tree | 802d343a0a3e3f3dd685ac5e2d3f3ce3b02b71c6 /src/processor/http | |
| parent | Merge pull request #1382 from akihikodaki/unfollow (diff) | |
| download | sharkey-76efc039632043514ad55feec8448f073835cfc7.tar.gz sharkey-76efc039632043514ad55feec8448f073835cfc7.tar.bz2 sharkey-76efc039632043514ad55feec8448f073835cfc7.zip | |
Add createdAt property
Diffstat (limited to 'src/processor/http')
| -rw-r--r-- | src/processor/http/unfollow.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/processor/http/unfollow.ts b/src/processor/http/unfollow.ts index 4a8f033914..d3d5f2246f 100644 --- a/src/processor/http/unfollow.ts +++ b/src/processor/http/unfollow.ts @@ -22,6 +22,7 @@ export default async ({ data }) => { // Decrement following count User.update({ _id: following.followerId }, { $inc: { followingCount: -1 } }), promisedFollower.then(({ followingCount }) => FollowingLog.insert({ + createdAt: new Date(), userId: following.followerId, count: followingCount - 1 })), @@ -29,6 +30,7 @@ export default async ({ data }) => { // Decrement followers count User.update({ _id: following.followeeId }, { $inc: { followersCount: -1 } }), promisedFollowee.then(({ followersCount }) => FollowedLog.insert({ + createdAt: new Date(), userId: following.followeeId, count: followersCount - 1 })), |