aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/activitypub/utils.ts
blob: 5de38eb434c85571b0e18aaa484753b98b82170e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import express from 'express'

async function activityPubResponse (promise: Promise<any>, res: express.Response) {
  const data = await promise

  return res.type('application/activity+json; charset=utf-8')
            .json(data)
}

export {
  activityPubResponse
}