aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-01-27 17:15:21 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-01-28 15:55:34 +0100
commitba5d4a849c7d7ba05f093480ae12286c4af61556 (patch)
tree704a80b96d3b437ad12feacaaaf58a96b97282a1 /server/controllers
parent3da68f0a781ebd893521e2e6fa200280c92ae815 (diff)
downloadPeerTube-ba5d4a849c7d7ba05f093480ae12286c4af61556.tar.gz
PeerTube-ba5d4a849c7d7ba05f093480ae12286c4af61556.tar.zst
PeerTube-ba5d4a849c7d7ba05f093480ae12286c4af61556.zip
move from trending routes to alg param
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/config.ts26
1 files changed, 13 insertions, 13 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index 24e7601ec..45c03be24 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -68,12 +68,6 @@ async function getConfig (req: express.Request, res: express.Response) {
68 isNSFW: CONFIG.INSTANCE.IS_NSFW, 68 isNSFW: CONFIG.INSTANCE.IS_NSFW,
69 defaultNSFWPolicy: CONFIG.INSTANCE.DEFAULT_NSFW_POLICY, 69 defaultNSFWPolicy: CONFIG.INSTANCE.DEFAULT_NSFW_POLICY,
70 defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE, 70 defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE,
71 defaultTrendingRoute: CONFIG.INSTANCE.DEFAULT_TRENDING_ROUTE,
72 pages: {
73 hot: {
74 enabled: CONFIG.INSTANCE.PAGES.HOT.ENABLED
75 }
76 },
77 customizations: { 71 customizations: {
78 javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT, 72 javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT,
79 css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS 73 css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS
@@ -189,7 +183,11 @@ async function getConfig (req: express.Request, res: express.Response) {
189 }, 183 },
190 trending: { 184 trending: {
191 videos: { 185 videos: {
192 intervalDays: CONFIG.TRENDING.VIDEOS.INTERVAL_DAYS 186 intervalDays: CONFIG.TRENDING.VIDEOS.INTERVAL_DAYS,
187 algorithms: {
188 enabled: CONFIG.TRENDING.VIDEOS.ALGORITHMS.ENABLED,
189 default: CONFIG.TRENDING.VIDEOS.ALGORITHMS.DEFAULT
190 }
193 } 191 }
194 }, 192 },
195 tracker: { 193 tracker: {
@@ -371,12 +369,6 @@ function customConfig (): CustomConfig {
371 defaultNSFWPolicy: CONFIG.INSTANCE.DEFAULT_NSFW_POLICY, 369 defaultNSFWPolicy: CONFIG.INSTANCE.DEFAULT_NSFW_POLICY,
372 370
373 defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE, 371 defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE,
374 defaultTrendingRoute: CONFIG.INSTANCE.DEFAULT_TRENDING_ROUTE,
375 pages: {
376 hot: {
377 enabled: CONFIG.INSTANCE.PAGES.HOT.ENABLED
378 }
379 },
380 372
381 customizations: { 373 customizations: {
382 css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS, 374 css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS,
@@ -467,6 +459,14 @@ function customConfig (): CustomConfig {
467 } 459 }
468 } 460 }
469 }, 461 },
462 trending: {
463 videos: {
464 algorithms: {
465 enabled: CONFIG.TRENDING.VIDEOS.ALGORITHMS.ENABLED,
466 default: CONFIG.TRENDING.VIDEOS.ALGORITHMS.DEFAULT
467 }
468 }
469 },
470 autoBlacklist: { 470 autoBlacklist: {
471 videos: { 471 videos: {
472 ofUsers: { 472 ofUsers: {