aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/feeds.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/feeds.ts')
-rw-r--r--server/controllers/feeds.ts5
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'
8import { cacheRoute } from '../middlewares/cache' 8import { cacheRoute } from '../middlewares/cache'
9import { VideoChannelModel } from '../models/video/video-channel' 9import { VideoChannelModel } from '../models/video/video-channel'
10import { VideoCommentModel } from '../models/video/video-comment' 10import { VideoCommentModel } from '../models/video/video-comment'
11import { buildNSFWFilter } from '../helpers/express-utils'
11 12
12const feedsRouter = express.Router() 13const 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,