diff options
| author | こぴなたみぽ <Syuilotan@yahoo.co.jp> | 2017-11-06 19:04:38 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-06 19:04:38 +0900 |
| commit | 5dd93272dda3b54973f6cbe896a36b4c0d0b1588 (patch) | |
| tree | 60fea740d9482851583a6582ef777bdffb8db1eb /src/api/endpoints/drive.ts | |
| parent | chore(package): update @types/express to version 4.0.39 (diff) | |
| parent | Merge pull request #867 from syuilo/greenkeeper/@types/mongodb-2.2.15 (diff) | |
| download | misskey-5dd93272dda3b54973f6cbe896a36b4c0d0b1588.tar.gz misskey-5dd93272dda3b54973f6cbe896a36b4c0d0b1588.tar.bz2 misskey-5dd93272dda3b54973f6cbe896a36b4c0d0b1588.zip | |
Merge branch 'master' into greenkeeper/@types/express-4.0.39
Diffstat (limited to 'src/api/endpoints/drive.ts')
| -rw-r--r-- | src/api/endpoints/drive.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/endpoints/drive.ts b/src/api/endpoints/drive.ts index 41ad6301d7..d92473633a 100644 --- a/src/api/endpoints/drive.ts +++ b/src/api/endpoints/drive.ts @@ -14,16 +14,16 @@ module.exports = (params, user) => new Promise(async (res, rej) => { // Calculate drive usage const usage = ((await DriveFile .aggregate([ - { $match: { user_id: user._id } }, + { $match: { 'metadata.user_id': user._id } }, { $project: { - datasize: true + length: true } }, { $group: { _id: null, - usage: { $sum: '$datasize' } + usage: { $sum: '$length' } } } ]))[0] || { |