2021-08-27 08:32:44 -04:00
|
|
|
import express from 'express'
|
2018-05-25 10:21:16 -04:00
|
|
|
|
2023-03-10 06:01:21 -05:00
|
|
|
async function activityPubResponse (promise: Promise<any>, res: express.Response) {
|
|
|
|
const data = await promise
|
|
|
|
|
2018-05-25 10:21:16 -04:00
|
|
|
return res.type('application/activity+json; charset=utf-8')
|
|
|
|
.json(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
|
|
|
activityPubResponse
|
|
|
|
}
|