summaryrefslogtreecommitdiff
path: root/src/api/endpoints/drive.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/endpoints/drive.ts')
-rw-r--r--src/api/endpoints/drive.ts6
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] || {