diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/activitypub/outbox.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/controllers/activitypub/outbox.ts b/server/controllers/activitypub/outbox.ts index f3dd2ad7d..916a110a8 100644 --- a/server/controllers/activitypub/outbox.ts +++ b/server/controllers/activitypub/outbox.ts | |||
@@ -9,15 +9,18 @@ import { asyncMiddleware, localAccountValidator, localVideoChannelValidator } fr | |||
9 | import { VideoModel } from '../../models/video/video' | 9 | import { VideoModel } from '../../models/video/video' |
10 | import { activityPubResponse } from './utils' | 10 | import { activityPubResponse } from './utils' |
11 | import { MActorLight } from '@server/typings/models' | 11 | import { MActorLight } from '@server/typings/models' |
12 | import { apPaginationValidator } from '../../middlewares/validators/activitypub' | ||
12 | 13 | ||
13 | const outboxRouter = express.Router() | 14 | const outboxRouter = express.Router() |
14 | 15 | ||
15 | outboxRouter.get('/accounts/:name/outbox', | 16 | outboxRouter.get('/accounts/:name/outbox', |
17 | apPaginationValidator, | ||
16 | localAccountValidator, | 18 | localAccountValidator, |
17 | asyncMiddleware(outboxController) | 19 | asyncMiddleware(outboxController) |
18 | ) | 20 | ) |
19 | 21 | ||
20 | outboxRouter.get('/video-channels/:name/outbox', | 22 | outboxRouter.get('/video-channels/:name/outbox', |
23 | apPaginationValidator, | ||
21 | localVideoChannelValidator, | 24 | localVideoChannelValidator, |
22 | asyncMiddleware(outboxController) | 25 | asyncMiddleware(outboxController) |
23 | ) | 26 | ) |
@@ -38,7 +41,7 @@ async function outboxController (req: express.Request, res: express.Response) { | |||
38 | logger.info('Receiving outbox request for %s.', actorOutboxUrl) | 41 | logger.info('Receiving outbox request for %s.', actorOutboxUrl) |
39 | 42 | ||
40 | const handler = (start: number, count: number) => buildActivities(actor, start, count) | 43 | const handler = (start: number, count: number) => buildActivities(actor, start, count) |
41 | const json = await activityPubCollectionPagination(actorOutboxUrl, handler, req.query.page) | 44 | const json = await activityPubCollectionPagination(actorOutboxUrl, handler, req.query.page, req.query.size) |
42 | 45 | ||
43 | return activityPubResponse(activityPubContextify(json), res) | 46 | return activityPubResponse(activityPubContextify(json), res) |
44 | } | 47 | } |