From 8fffe21a7bc96d08b229293d66ddba576e609790 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 25 May 2018 16:21:16 +0200 Subject: Refractor and optimize AP collections Only display urls in general object, and paginate video comments, shares, likes and dislikes --- server/controllers/activitypub/utils.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 server/controllers/activitypub/utils.ts (limited to 'server/controllers/activitypub/utils.ts') diff --git a/server/controllers/activitypub/utils.ts b/server/controllers/activitypub/utils.ts new file mode 100644 index 000000000..599cf48ab --- /dev/null +++ b/server/controllers/activitypub/utils.ts @@ -0,0 +1,11 @@ +import * as express from 'express' + +function activityPubResponse (data: any, res: express.Response) { + return res.type('application/activity+json; charset=utf-8') + .json(data) + .end() +} + +export { + activityPubResponse +} -- cgit v1.2.3