aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-08 12:53:09 +0100
committerChocobozzz <me@florianbigard.com>2018-01-08 12:53:09 +0100
commitce5496d6a31b9617aba67970f5dc135e73335234 (patch)
treeb5d2578f4618b71632e92838c3ceae36aa102798 /server/models/account
parent108af66140713c4beec681a71d360ab788226528 (diff)
downloadPeerTube-ce5496d6a31b9617aba67970f5dc135e73335234.tar.gz
PeerTube-ce5496d6a31b9617aba67970f5dc135e73335234.tar.zst
PeerTube-ce5496d6a31b9617aba67970f5dc135e73335234.zip
Support video quota on client
Diffstat (limited to 'server/models/account')
-rw-r--r--server/models/account/user.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/models/account/user.ts b/server/models/account/user.ts
index 4226bcb35..e37fd4d3b 100644
--- a/server/models/account/user.ts
+++ b/server/models/account/user.ts
@@ -181,7 +181,7 @@ export class UserModel extends Model<UserModel> {
181 return UserModel.findOne(query) 181 return UserModel.findOne(query)
182 } 182 }
183 183
184 private static getOriginalVideoFileTotalFromUser (user: UserModel) { 184 static getOriginalVideoFileTotalFromUser (user: UserModel) {
185 // Don't use sequelize because we need to use a sub query 185 // Don't use sequelize because we need to use a sub query
186 const query = 'SELECT SUM("size") AS "total" FROM ' + 186 const query = 'SELECT SUM("size") AS "total" FROM ' +
187 '(SELECT MAX("videoFile"."size") AS "size" FROM "videoFile" ' + 187 '(SELECT MAX("videoFile"."size") AS "size" FROM "videoFile" ' +