diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-11 14:36:07 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-11 14:36:07 +0200 |
commit | 7c3a6636fdd9b905345996d825c249a18add8a2c (patch) | |
tree | 2392a297d579345837fc2ed9f225693888ee1bd4 /server/controllers | |
parent | fd6a74a83594bfb59e28bf9cae71a39884ebcc2f (diff) | |
download | PeerTube-7c3a6636fdd9b905345996d825c249a18add8a2c.tar.gz PeerTube-7c3a6636fdd9b905345996d825c249a18add8a2c.tar.zst PeerTube-7c3a6636fdd9b905345996d825c249a18add8a2c.zip |
Move get* video methods to formatter
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/feeds.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts index 865f5c2a1..435b12193 100644 --- a/server/controllers/feeds.ts +++ b/server/controllers/feeds.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import * as Feed from 'pfeed' | 2 | import * as Feed from 'pfeed' |
3 | import { getCategoryLabel } from '@server/models/video/formatter/video-format-utils' | ||
3 | import { VideoFilter } from '../../shared/models/videos/video-query.type' | 4 | import { VideoFilter } from '../../shared/models/videos/video-query.type' |
4 | import { buildNSFWFilter } from '../helpers/express-utils' | 5 | import { buildNSFWFilter } from '../helpers/express-utils' |
5 | import { CONFIG } from '../initializers/config' | 6 | import { CONFIG } from '../initializers/config' |
@@ -286,7 +287,7 @@ function addVideosToFeed (feed, videos: VideoModel[]) { | |||
286 | if (video.category) { | 287 | if (video.category) { |
287 | categories.push({ | 288 | categories.push({ |
288 | value: video.category, | 289 | value: video.category, |
289 | label: VideoModel.getCategoryLabel(video.category) | 290 | label: getCategoryLabel(video.category) |
290 | }) | 291 | }) |
291 | } | 292 | } |
292 | 293 | ||