| 1 | import express from 'express' |
| 2 | |
| 3 | async function activityPubResponse (promise: Promise<any>, res: express.Response) { |
| 4 | const data = await promise |
| 5 | |
| 6 | return res.type('application/activity+json; charset=utf-8') |
| 7 | .json(data) |
| 8 | } |
| 9 | |
| 10 | export { |
| 11 | activityPubResponse |
| 12 | } |