From 5ce6fa67d212823be43c796e8632b721ede065bb Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 2 Apr 2018 23:19:07 +0900 Subject: Make migration scripts and use createdAt instead of _id --- src/processor/http/follow.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/processor') diff --git a/src/processor/http/follow.ts b/src/processor/http/follow.ts index 29ac9fa552..cbb7838c68 100644 --- a/src/processor/http/follow.ts +++ b/src/processor/http/follow.ts @@ -24,6 +24,7 @@ export default ({ data }, done) => Following.findOne({ _id: data.following }).th }), promisedFollower.then(({ followingCount }) => FollowingLog.insert({ + createdAt: data.following.createdAt, userId: followerId, count: followingCount + 1 })), @@ -36,6 +37,7 @@ export default ({ data }, done) => Following.findOne({ _id: data.following }).th }), promisedFollowee.then(({ followersCount }) => FollowedLog.insert({ + createdAt: data.following.createdAt, userId: followerId, count: followersCount + 1 })), -- cgit v1.2.3-freya