This commit is contained in:
syuilo
2017-01-17 11:11:22 +09:00
parent caa8aee7a0
commit 9f81288fcc
48 changed files with 91 additions and 140 deletions

View File

@ -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);

View File

@ -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);