From 9f81288fccdbaf9184d49e61680747945b34f23d Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 17 Jan 2017 11:11:22 +0900 Subject: Fix bug --- src/api/common/add-file-to-drive.ts | 3 +-- src/api/common/get-friends.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/api/common') diff --git a/src/api/common/add-file-to-drive.ts b/src/api/common/add-file-to-drive.ts index e001216eee..76ca6c9139 100644 --- a/src/api/common/add-file-to-drive.ts +++ b/src/api/common/add-file-to-drive.ts @@ -72,8 +72,7 @@ export default ( .find({ user_id: user._id }, { datasize: true, _id: false - }) - .toArray(); + }); // Calculate drive usage (in byte) const usage = files.map(file => file.datasize).reduce((x, y) => x + y, 0); diff --git a/src/api/common/get-friends.ts b/src/api/common/get-friends.ts index 5d50bcdb13..6703382e8f 100644 --- a/src/api/common/get-friends.ts +++ b/src/api/common/get-friends.ts @@ -11,8 +11,7 @@ export default async (me: mongodb.ObjectID, includeMe: boolean = true) => { deleted_at: { $exists: false } }, { followee_id: true - }) - .toArray(); + }); // ID list of other users who the I follows const myfollowingIds = myfollowing.map(follow => follow.followee_id); -- cgit v1.2.3-freya