diff options
author | Chocobozzz <me@florianbigard.com> | 2020-09-25 16:19:35 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | fb7194043d0486ce0a6a40b2ffbdf32878c33a6f (patch) | |
tree | 6ed304a5d730a75da0a4460b3009df88684fa598 /server/controllers/api/users/me.ts | |
parent | a5cf76afa378aae81af2a9b0ce548e5d2582f832 (diff) | |
download | PeerTube-fb7194043d0486ce0a6a40b2ffbdf32878c33a6f.tar.gz PeerTube-fb7194043d0486ce0a6a40b2ffbdf32878c33a6f.tar.zst PeerTube-fb7194043d0486ce0a6a40b2ffbdf32878c33a6f.zip |
Check live duration and size
Diffstat (limited to 'server/controllers/api/users/me.ts')
-rw-r--r-- | server/controllers/api/users/me.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts index ba60a3d2a..b490518fc 100644 --- a/server/controllers/api/users/me.ts +++ b/server/controllers/api/users/me.ts | |||
@@ -9,7 +9,7 @@ import { MIMETYPES } from '../../../initializers/constants' | |||
9 | import { sequelizeTypescript } from '../../../initializers/database' | 9 | import { sequelizeTypescript } from '../../../initializers/database' |
10 | import { sendUpdateActor } from '../../../lib/activitypub/send' | 10 | import { sendUpdateActor } from '../../../lib/activitypub/send' |
11 | import { updateActorAvatarFile } from '../../../lib/avatar' | 11 | import { updateActorAvatarFile } from '../../../lib/avatar' |
12 | import { sendVerifyUserEmail } from '../../../lib/user' | 12 | import { getOriginalVideoFileTotalDailyFromUser, getOriginalVideoFileTotalFromUser, sendVerifyUserEmail } from '../../../lib/user' |
13 | import { | 13 | import { |
14 | asyncMiddleware, | 14 | asyncMiddleware, |
15 | asyncRetryTransactionMiddleware, | 15 | asyncRetryTransactionMiddleware, |
@@ -133,8 +133,8 @@ async function getUserInformation (req: express.Request, res: express.Response) | |||
133 | 133 | ||
134 | async function getUserVideoQuotaUsed (req: express.Request, res: express.Response) { | 134 | async function getUserVideoQuotaUsed (req: express.Request, res: express.Response) { |
135 | const user = res.locals.oauth.token.user | 135 | const user = res.locals.oauth.token.user |
136 | const videoQuotaUsed = await UserModel.getOriginalVideoFileTotalFromUser(user) | 136 | const videoQuotaUsed = await getOriginalVideoFileTotalFromUser(user) |
137 | const videoQuotaUsedDaily = await UserModel.getOriginalVideoFileTotalDailyFromUser(user) | 137 | const videoQuotaUsedDaily = await getOriginalVideoFileTotalDailyFromUser(user) |
138 | 138 | ||
139 | const data: UserVideoQuota = { | 139 | const data: UserVideoQuota = { |
140 | videoQuotaUsed, | 140 | videoQuotaUsed, |