aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/activitypub/outbox.ts5
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
9import { VideoModel } from '../../models/video/video' 9import { VideoModel } from '../../models/video/video'
10import { activityPubResponse } from './utils' 10import { activityPubResponse } from './utils'
11import { MActorLight } from '@server/typings/models' 11import { MActorLight } from '@server/typings/models'
12import { apPaginationValidator } from '../../middlewares/validators/activitypub'
12 13
13const outboxRouter = express.Router() 14const outboxRouter = express.Router()
14 15
15outboxRouter.get('/accounts/:name/outbox', 16outboxRouter.get('/accounts/:name/outbox',
17 apPaginationValidator,
16 localAccountValidator, 18 localAccountValidator,
17 asyncMiddleware(outboxController) 19 asyncMiddleware(outboxController)
18) 20)
19 21
20outboxRouter.get('/video-channels/:name/outbox', 22outboxRouter.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}