]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/activitypub/utils.ts
Add ability for plugins to alter video jsonld
[github/Chocobozzz/PeerTube.git] / server / controllers / activitypub / utils.ts
index f851ef652d0c2d2a251e58f6cbf9bd4a44a3f396..5de38eb434c85571b0e18aaa484753b98b82170e 100644 (file)
@@ -1,6 +1,8 @@
 import express from 'express'
 
-function activityPubResponse (data: any, res: express.Response) {
+async function activityPubResponse (promise: Promise<any>, res: express.Response) {
+  const data = await promise
+
   return res.type('application/activity+json; charset=utf-8')
             .json(data)
 }