aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-06 13:59:50 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-09 15:33:04 +0100
commit3cabf3532b9118a19311f14ca3e171d12d554a2f (patch)
tree46072616df4623d91c87f648e4033b3f1d05d404 /server/controllers/api
parentc8f3cfeba7acc2ab9c5f03161d22856202a49326 (diff)
downloadPeerTube-3cabf3532b9118a19311f14ca3e171d12d554a2f.tar.gz
PeerTube-3cabf3532b9118a19311f14ca3e171d12d554a2f.tar.zst
PeerTube-3cabf3532b9118a19311f14ca3e171d12d554a2f.zip
Add live server hooks
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/videos/live.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/videos/live.ts b/server/controllers/api/videos/live.ts
index f980c7730..d438b6f3a 100644
--- a/server/controllers/api/videos/live.ts
+++ b/server/controllers/api/videos/live.ts
@@ -5,6 +5,7 @@ import { CONFIG } from '@server/initializers/config'
5import { ASSETS_PATH, MIMETYPES } from '@server/initializers/constants' 5import { ASSETS_PATH, MIMETYPES } from '@server/initializers/constants'
6import { getVideoActivityPubUrl } from '@server/lib/activitypub/url' 6import { getVideoActivityPubUrl } from '@server/lib/activitypub/url'
7import { federateVideoIfNeeded } from '@server/lib/activitypub/videos' 7import { federateVideoIfNeeded } from '@server/lib/activitypub/videos'
8import { Hooks } from '@server/lib/plugins/hooks'
8import { buildLocalVideoFromReq, buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' 9import { buildLocalVideoFromReq, buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video'
9import { videoLiveAddValidator, videoLiveGetValidator, videoLiveUpdateValidator } from '@server/middlewares/validators/videos/video-live' 10import { videoLiveAddValidator, videoLiveGetValidator, videoLiveUpdateValidator } from '@server/middlewares/validators/videos/video-live'
10import { VideoLiveModel } from '@server/models/video/video-live' 11import { VideoLiveModel } from '@server/models/video/video-live'
@@ -128,6 +129,8 @@ async function addLiveVideo (req: express.Request, res: express.Response) {
128 return { videoCreated } 129 return { videoCreated }
129 }) 130 })
130 131
132 Hooks.runAction('action:api.live-video.created', { video: videoCreated })
133
131 return res.json({ 134 return res.json({
132 video: { 135 video: {
133 id: videoCreated.id, 136 id: videoCreated.id,