From 18490b07650d77d7fe376970b749af5a8c672fd6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 25 Nov 2020 11:04:18 +0100 Subject: Fix migration and test --- server/controllers/feeds.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'server/controllers') diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts index 5c95069fc..2182b42f5 100644 --- a/server/controllers/feeds.ts +++ b/server/controllers/feeds.ts @@ -12,7 +12,7 @@ import { videoCommentsFeedsValidator, videoFeedsValidator, videosSortValidator, - videoSubscriptonFeedsValidator + videoSubscriptionFeedsValidator } from '../middlewares' import { cacheRoute } from '../middlewares/cache' import { VideoModel } from '../models/video/video' @@ -60,7 +60,7 @@ feedsRouter.get('/feeds/subscriptions.:format', ] })(ROUTE_CACHE_LIFETIME.FEEDS)), commonVideosFiltersValidator, - asyncMiddleware(videoSubscriptonFeedsValidator), + asyncMiddleware(videoSubscriptionFeedsValidator), asyncMiddleware(generateVideoFeedForSubscriptions) ) @@ -198,20 +198,17 @@ async function generateVideoFeedForSubscriptions (req: express.Request, res: exp queryString: new URL(WEBSERVER.URL + req.url).search }) - const options = { - followerActorId: res.locals.user.Account.Actor.id, - user: res.locals.user - } - const resultList = await VideoModel.listForApi({ start, count: FEEDS.COUNT, sort: req.query.sort, - includeLocalVideos: true, + includeLocalVideos: false, nsfw, filter: req.query.filter as VideoFilter, withFiles: true, - ...options + + followerActorId: res.locals.user.Account.Actor.id, + user: res.locals.user }) addVideosToFeed(feed, resultList.data) -- cgit v1.2.3