diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-25 11:04:18 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-25 11:07:56 +0100 |
commit | 18490b07650d77d7fe376970b749af5a8c672fd6 (patch) | |
tree | 89741e63e34c2659487c9afa8309755064cb0c39 /server/controllers | |
parent | 5beb89f223539f1e415a976ff104f772526b4d20 (diff) | |
download | PeerTube-18490b07650d77d7fe376970b749af5a8c672fd6.tar.gz PeerTube-18490b07650d77d7fe376970b749af5a8c672fd6.tar.zst PeerTube-18490b07650d77d7fe376970b749af5a8c672fd6.zip |
Fix migration and test
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/feeds.ts | 15 |
1 files changed, 6 insertions, 9 deletions
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 { | |||
12 | videoCommentsFeedsValidator, | 12 | videoCommentsFeedsValidator, |
13 | videoFeedsValidator, | 13 | videoFeedsValidator, |
14 | videosSortValidator, | 14 | videosSortValidator, |
15 | videoSubscriptonFeedsValidator | 15 | videoSubscriptionFeedsValidator |
16 | } from '../middlewares' | 16 | } from '../middlewares' |
17 | import { cacheRoute } from '../middlewares/cache' | 17 | import { cacheRoute } from '../middlewares/cache' |
18 | import { VideoModel } from '../models/video/video' | 18 | import { VideoModel } from '../models/video/video' |
@@ -60,7 +60,7 @@ feedsRouter.get('/feeds/subscriptions.:format', | |||
60 | ] | 60 | ] |
61 | })(ROUTE_CACHE_LIFETIME.FEEDS)), | 61 | })(ROUTE_CACHE_LIFETIME.FEEDS)), |
62 | commonVideosFiltersValidator, | 62 | commonVideosFiltersValidator, |
63 | asyncMiddleware(videoSubscriptonFeedsValidator), | 63 | asyncMiddleware(videoSubscriptionFeedsValidator), |
64 | asyncMiddleware(generateVideoFeedForSubscriptions) | 64 | asyncMiddleware(generateVideoFeedForSubscriptions) |
65 | ) | 65 | ) |
66 | 66 | ||
@@ -198,20 +198,17 @@ async function generateVideoFeedForSubscriptions (req: express.Request, res: exp | |||
198 | queryString: new URL(WEBSERVER.URL + req.url).search | 198 | queryString: new URL(WEBSERVER.URL + req.url).search |
199 | }) | 199 | }) |
200 | 200 | ||
201 | const options = { | ||
202 | followerActorId: res.locals.user.Account.Actor.id, | ||
203 | user: res.locals.user | ||
204 | } | ||
205 | |||
206 | const resultList = await VideoModel.listForApi({ | 201 | const resultList = await VideoModel.listForApi({ |
207 | start, | 202 | start, |
208 | count: FEEDS.COUNT, | 203 | count: FEEDS.COUNT, |
209 | sort: req.query.sort, | 204 | sort: req.query.sort, |
210 | includeLocalVideos: true, | 205 | includeLocalVideos: false, |
211 | nsfw, | 206 | nsfw, |
212 | filter: req.query.filter as VideoFilter, | 207 | filter: req.query.filter as VideoFilter, |
213 | withFiles: true, | 208 | withFiles: true, |
214 | ...options | 209 | |
210 | followerActorId: res.locals.user.Account.Actor.id, | ||
211 | user: res.locals.user | ||
215 | }) | 212 | }) |
216 | 213 | ||
217 | addVideosToFeed(feed, resultList.data) | 214 | addVideosToFeed(feed, resultList.data) |