From 4a1c484b7e3800b90f02aaddefc71563d4f63792 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 3 Apr 2018 17:24:28 +0900 Subject: [PATCH] Add createdAt property --- src/processor/http/unfollow.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/processor/http/unfollow.ts b/src/processor/http/unfollow.ts index 4a8f03391..d3d5f2246 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 })),