aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users/me.ts
diff options
context:
space:
mode:
authorFelix Ableitner <me@nutomic.com>2018-08-28 02:01:35 -0500
committerChocobozzz <me@florianbigard.com>2018-08-28 09:01:35 +0200
commitbee0abffff73804d816b90c7fd599e0a51c09d61 (patch)
treefae6d58637f9c63a3800090277f8e130b43442dd /server/controllers/api/users/me.ts
parentc907c2fa3fd7c0a741117a0204d0ebca675124bd (diff)
downloadPeerTube-bee0abffff73804d816b90c7fd599e0a51c09d61.tar.gz
PeerTube-bee0abffff73804d816b90c7fd599e0a51c09d61.tar.zst
PeerTube-bee0abffff73804d816b90c7fd599e0a51c09d61.zip
Implement daily upload limit (#956)
* Implement daily upload limit (ref #652) * remove duplicate code * review fixes * fix tests? * whitespace fixes, finish leftover todo * fix tests * added some new tests * use different config value for tests * remove todo
Diffstat (limited to 'server/controllers/api/users/me.ts')
-rw-r--r--server/controllers/api/users/me.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts
index 000c706b5..0f18b42f9 100644
--- a/server/controllers/api/users/me.ts
+++ b/server/controllers/api/users/me.ts
@@ -283,9 +283,11 @@ async function getUserVideoQuotaUsed (req: express.Request, res: express.Respons
283 // We did not load channels in res.locals.user 283 // We did not load channels in res.locals.user
284 const user = await UserModel.loadByUsernameAndPopulateChannels(res.locals.oauth.token.user.username) 284 const user = await UserModel.loadByUsernameAndPopulateChannels(res.locals.oauth.token.user.username)
285 const videoQuotaUsed = await UserModel.getOriginalVideoFileTotalFromUser(user) 285 const videoQuotaUsed = await UserModel.getOriginalVideoFileTotalFromUser(user)
286 const videoQuotaUsedDaily = await UserModel.getOriginalVideoFileTotalDailyFromUser(user)
286 287
287 const data: UserVideoQuota = { 288 const data: UserVideoQuota = {
288 videoQuotaUsed 289 videoQuotaUsed,
290 videoQuotaUsedDaily
289 } 291 }
290 return res.json(data) 292 return res.json(data)
291} 293}