aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-29 11:54:38 +0200
committerChocobozzz <me@florianbigard.com>2021-07-29 11:54:38 +0200
commitd6886027109af42be2e3ec5d14ad166199add11d (patch)
tree3a7603d36ff35a2d623d863f14ab93a2e1e6b7f2 /server/models/video/video.ts
parentb033851fb54241bb703f86add025229e68cc6f59 (diff)
downloadPeerTube-d6886027109af42be2e3ec5d14ad166199add11d.tar.gz
PeerTube-d6886027109af42be2e3ec5d14ad166199add11d.tar.zst
PeerTube-d6886027109af42be2e3ec5d14ad166199add11d.zip
Refactor search query options
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index fe92ead04..d5efe2eac 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1070,7 +1070,8 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
1070 const trendingDays = options.sort.endsWith('trending') 1070 const trendingDays = options.sort.endsWith('trending')
1071 ? CONFIG.TRENDING.VIDEOS.INTERVAL_DAYS 1071 ? CONFIG.TRENDING.VIDEOS.INTERVAL_DAYS
1072 : undefined 1072 : undefined
1073 let trendingAlgorithm 1073
1074 let trendingAlgorithm: string
1074 if (options.sort.endsWith('hot')) trendingAlgorithm = 'hot' 1075 if (options.sort.endsWith('hot')) trendingAlgorithm = 'hot'
1075 if (options.sort.endsWith('best')) trendingAlgorithm = 'best' 1076 if (options.sort.endsWith('best')) trendingAlgorithm = 'best'
1076 1077