X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Factivitypub%2Foutbox.ts;h=22328da7f3207e415fabe4c0504b27cc91dcc156;hb=819b656439e5f0ec2ae5de9357502cdfe3196197;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..22328da7f 100644 --- a/server/controllers/activitypub/outbox.ts +++ b/server/controllers/activitypub/outbox.ts @@ -8,16 +8,19 @@ import { buildAudience } from '../../lib/activitypub/audience' import { asyncMiddleware, localAccountValidator, localVideoChannelValidator } from '../../middlewares' import { VideoModel } from '../../models/video/video' import { activityPubResponse } from './utils' -import { MActorLight } from '@server/typings/models' +import { MActorLight } from '@server/types/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) }