aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/controllers/api/config.ts1
-rw-r--r--server/lib/oauth-model.ts1
-rw-r--r--server/tests/api/server/config.ts2
3 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index 3fd355e6d..8dfc3deb4 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -161,6 +161,7 @@ async function updateCustomConfig (req: express.Request, res: express.Response,
161 // camelCase to snake_case key 161 // camelCase to snake_case key
162 const toUpdateJSON = omit(toUpdate, 'user.videoQuota', 'instance.defaultClientRoute', 'instance.shortDescription', 'cache.videoCaptions') 162 const toUpdateJSON = omit(toUpdate, 'user.videoQuota', 'instance.defaultClientRoute', 'instance.shortDescription', 'cache.videoCaptions')
163 toUpdateJSON.user['video_quota'] = toUpdate.user.videoQuota 163 toUpdateJSON.user['video_quota'] = toUpdate.user.videoQuota
164 toUpdateJSON.user['video_quota_daily'] = toUpdate.user.videoQuotaDaily
164 toUpdateJSON.instance['default_client_route'] = toUpdate.instance.defaultClientRoute 165 toUpdateJSON.instance['default_client_route'] = toUpdate.instance.defaultClientRoute
165 toUpdateJSON.instance['short_description'] = toUpdate.instance.shortDescription 166 toUpdateJSON.instance['short_description'] = toUpdate.instance.shortDescription
166 toUpdateJSON.instance['default_nsfw_policy'] = toUpdate.instance.defaultNSFWPolicy 167 toUpdateJSON.instance['default_nsfw_policy'] = toUpdate.instance.defaultNSFWPolicy
diff --git a/server/lib/oauth-model.ts b/server/lib/oauth-model.ts
index 272e90f3a..09eaf75d1 100644
--- a/server/lib/oauth-model.ts
+++ b/server/lib/oauth-model.ts
@@ -23,7 +23,6 @@ function getClient (clientId: string, clientSecret: string) {
23function getRefreshToken (refreshToken: string) { 23function getRefreshToken (refreshToken: string) {
24 logger.debug('Getting RefreshToken (refreshToken: ' + refreshToken + ').') 24 logger.debug('Getting RefreshToken (refreshToken: ' + refreshToken + ').')
25 25
26
27 return OAuthTokenModel.getByRefreshTokenAndPopulateClient(refreshToken) 26 return OAuthTokenModel.getByRefreshTokenAndPopulateClient(refreshToken)
28} 27}
29 28
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts
index 8a5f27c34..ece4118a6 100644
--- a/server/tests/api/server/config.ts
+++ b/server/tests/api/server/config.ts
@@ -37,7 +37,7 @@ function checkInitialConfig (data: CustomConfig) {
37 expect(data.signup.limit).to.equal(4) 37 expect(data.signup.limit).to.equal(4)
38 expect(data.admin.email).to.equal('admin1@example.com') 38 expect(data.admin.email).to.equal('admin1@example.com')
39 expect(data.user.videoQuota).to.equal(5242880) 39 expect(data.user.videoQuota).to.equal(5242880)
40 expect(data.user.videoQuotaDaily).to.equal(318742) 40 expect(data.user.videoQuotaDaily).to.equal(-1)
41 expect(data.transcoding.enabled).to.be.false 41 expect(data.transcoding.enabled).to.be.false
42 expect(data.transcoding.threads).to.equal(2) 42 expect(data.transcoding.threads).to.equal(2)
43 expect(data.transcoding.resolutions['240p']).to.be.true 43 expect(data.transcoding.resolutions['240p']).to.be.true