diff options
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/config.ts | 5 | ||||
-rw-r--r-- | server/controllers/api/users/me.ts | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts index bd100ef9c..99aabba62 100644 --- a/server/controllers/api/config.ts +++ b/server/controllers/api/config.ts | |||
@@ -118,6 +118,9 @@ async function getConfig (req: express.Request, res: express.Response) { | |||
118 | live: { | 118 | live: { |
119 | enabled: CONFIG.LIVE.ENABLED, | 119 | enabled: CONFIG.LIVE.ENABLED, |
120 | 120 | ||
121 | allowReplay: CONFIG.LIVE.ALLOW_REPLAY, | ||
122 | maxDuration: CONFIG.LIVE.MAX_DURATION, | ||
123 | |||
121 | transcoding: { | 124 | transcoding: { |
122 | enabled: CONFIG.LIVE.TRANSCODING.ENABLED, | 125 | enabled: CONFIG.LIVE.TRANSCODING.ENABLED, |
123 | enabledResolutions: getEnabledResolutions('live') | 126 | enabledResolutions: getEnabledResolutions('live') |
@@ -425,6 +428,8 @@ function customConfig (): CustomConfig { | |||
425 | }, | 428 | }, |
426 | live: { | 429 | live: { |
427 | enabled: CONFIG.LIVE.ENABLED, | 430 | enabled: CONFIG.LIVE.ENABLED, |
431 | allowReplay: CONFIG.LIVE.ALLOW_REPLAY, | ||
432 | maxDuration: CONFIG.LIVE.MAX_DURATION, | ||
428 | transcoding: { | 433 | transcoding: { |
429 | enabled: CONFIG.LIVE.TRANSCODING.ENABLED, | 434 | enabled: CONFIG.LIVE.TRANSCODING.ENABLED, |
430 | threads: CONFIG.LIVE.TRANSCODING.THREADS, | 435 | threads: CONFIG.LIVE.TRANSCODING.THREADS, |
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, |