summaryrefslogtreecommitdiff
path: root/src/api/common
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-01-17 11:11:22 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-01-17 11:11:22 +0900
commit9f81288fccdbaf9184d49e61680747945b34f23d (patch)
treedce25db34136ffd9c05852ed4c2c493c23c96c07 /src/api/common
parentFix bug (diff)
downloadmisskey-9f81288fccdbaf9184d49e61680747945b34f23d.tar.gz
misskey-9f81288fccdbaf9184d49e61680747945b34f23d.tar.bz2
misskey-9f81288fccdbaf9184d49e61680747945b34f23d.zip
Fix bug
Diffstat (limited to 'src/api/common')
-rw-r--r--src/api/common/add-file-to-drive.ts3
-rw-r--r--src/api/common/get-friends.ts3
2 files changed, 2 insertions, 4 deletions
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);