diff options
Diffstat (limited to 'server/controllers/feeds.ts')
-rw-r--r-- | server/controllers/feeds.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts index ff6b423d9..682f4abda 100644 --- a/server/controllers/feeds.ts +++ b/server/controllers/feeds.ts | |||
@@ -8,6 +8,7 @@ import { AccountModel } from '../models/account/account' | |||
8 | import { cacheRoute } from '../middlewares/cache' | 8 | import { cacheRoute } from '../middlewares/cache' |
9 | import { VideoChannelModel } from '../models/video/video-channel' | 9 | import { VideoChannelModel } from '../models/video/video-channel' |
10 | import { VideoCommentModel } from '../models/video/video-comment' | 10 | import { VideoCommentModel } from '../models/video/video-comment' |
11 | import { buildNSFWFilter } from '../helpers/express-utils' | ||
11 | 12 | ||
12 | const feedsRouter = express.Router() | 13 | const feedsRouter = express.Router() |
13 | 14 | ||
@@ -73,7 +74,7 @@ async function generateVideoFeed (req: express.Request, res: express.Response, n | |||
73 | 74 | ||
74 | const account: AccountModel = res.locals.account | 75 | const account: AccountModel = res.locals.account |
75 | const videoChannel: VideoChannelModel = res.locals.videoChannel | 76 | const videoChannel: VideoChannelModel = res.locals.videoChannel |
76 | const hideNSFW = CONFIG.INSTANCE.DEFAULT_NSFW_POLICY === 'do_not_list' | 77 | const nsfw = buildNSFWFilter(res, req.query.nsfw) |
77 | 78 | ||
78 | let name: string | 79 | let name: string |
79 | let description: string | 80 | let description: string |
@@ -95,7 +96,7 @@ async function generateVideoFeed (req: express.Request, res: express.Response, n | |||
95 | start, | 96 | start, |
96 | count: FEEDS.COUNT, | 97 | count: FEEDS.COUNT, |
97 | sort: req.query.sort, | 98 | sort: req.query.sort, |
98 | hideNSFW, | 99 | nsfw, |
99 | filter: req.query.filter, | 100 | filter: req.query.filter, |
100 | withFiles: true, | 101 | withFiles: true, |
101 | accountId: account ? account.id : null, | 102 | accountId: account ? account.id : null, |