X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Factivitypub%2Foutbox.ts;h=916a110a80aa24814e1b02921f1cc6125f3b8cbc;hb=bdd428a6d9138d751f8cde82867022a93f1a76cc;hp=f3dd2ad7d3e5fed8e1be89003813054cde20a24b;hpb=001ed2d40c8d2c8f494f5dc7f91ed62d56df10fd;p=github%2FChocobozzz%2FPeerTube.git 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 import { VideoModel } from '../../models/video/video' import { activityPubResponse } from './utils' import { MActorLight } from '@server/typings/models' +import { apPaginationValidator } from '../../middlewares/validators/activitypub' const outboxRouter = express.Router() outboxRouter.get('/accounts/:name/outbox', + apPaginationValidator, localAccountValidator, asyncMiddleware(outboxController) ) outboxRouter.get('/video-channels/:name/outbox', + apPaginationValidator, localVideoChannelValidator, asyncMiddleware(outboxController) ) @@ -38,7 +41,7 @@ async function outboxController (req: express.Request, res: express.Response) { logger.info('Receiving outbox request for %s.', actorOutboxUrl) const handler = (start: number, count: number) => buildActivities(actor, start, count) - const json = await activityPubCollectionPagination(actorOutboxUrl, handler, req.query.page) + const json = await activityPubCollectionPagination(actorOutboxUrl, handler, req.query.page, req.query.size) return activityPubResponse(activityPubContextify(json), res) }