]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/live.ts
Merge branch 'release/4.0.0' into develop
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / live.ts
index ed4da8f479ad3154bd545e57b90d88872256b7fe..e29615ff5c0292f44ffe22541dcad03d2fffeaf6 100644 (file)
@@ -1,4 +1,4 @@
-import * as express from 'express'
+import express from 'express'
 import { createReqFiles } from '@server/helpers/express-utils'
 import { buildUUID, uuidToShort } from '@server/helpers/uuid'
 import { CONFIG } from '@server/initializers/config'
@@ -39,7 +39,7 @@ liveRouter.post('/live',
 liveRouter.get('/live/:videoId',
   authenticate,
   asyncMiddleware(videoLiveGetValidator),
-  asyncRetryTransactionMiddleware(getLiveVideo)
+  getLiveVideo
 )
 
 liveRouter.put('/live/:videoId',
@@ -57,7 +57,7 @@ export {
 
 // ---------------------------------------------------------------------------
 
-async function getLiveVideo (req: express.Request, res: express.Response) {
+function getLiveVideo (req: express.Request, res: express.Response) {
   const videoLive = res.locals.videoLive
 
   return res.json(videoLive.toFormattedJSON())
@@ -133,7 +133,7 @@ async function addLiveVideo (req: express.Request, res: express.Response) {
     return { videoCreated }
   })
 
-  Hooks.runAction('action:api.live-video.created', { video: videoCreated })
+  Hooks.runAction('action:api.live-video.created', { video: videoCreated, req, res })
 
   return res.json({
     video: {