aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/config.ts5
-rw-r--r--server/controllers/api/users/me.ts6
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'
9import { sequelizeTypescript } from '../../../initializers/database' 9import { sequelizeTypescript } from '../../../initializers/database'
10import { sendUpdateActor } from '../../../lib/activitypub/send' 10import { sendUpdateActor } from '../../../lib/activitypub/send'
11import { updateActorAvatarFile } from '../../../lib/avatar' 11import { updateActorAvatarFile } from '../../../lib/avatar'
12import { sendVerifyUserEmail } from '../../../lib/user' 12import { getOriginalVideoFileTotalDailyFromUser, getOriginalVideoFileTotalFromUser, sendVerifyUserEmail } from '../../../lib/user'
13import { 13import {
14 asyncMiddleware, 14 asyncMiddleware,
15 asyncRetryTransactionMiddleware, 15 asyncRetryTransactionMiddleware,
@@ -133,8 +133,8 @@ async function getUserInformation (req: express.Request, res: express.Response)
133 133
134async function getUserVideoQuotaUsed (req: express.Request, res: express.Response) { 134async 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,