diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-06 13:59:50 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | 3cabf3532b9118a19311f14ca3e171d12d554a2f (patch) | |
tree | 46072616df4623d91c87f648e4033b3f1d05d404 /server/controllers/api | |
parent | c8f3cfeba7acc2ab9c5f03161d22856202a49326 (diff) | |
download | PeerTube-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.ts | 3 |
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' | |||
5 | import { ASSETS_PATH, MIMETYPES } from '@server/initializers/constants' | 5 | import { ASSETS_PATH, MIMETYPES } from '@server/initializers/constants' |
6 | import { getVideoActivityPubUrl } from '@server/lib/activitypub/url' | 6 | import { getVideoActivityPubUrl } from '@server/lib/activitypub/url' |
7 | import { federateVideoIfNeeded } from '@server/lib/activitypub/videos' | 7 | import { federateVideoIfNeeded } from '@server/lib/activitypub/videos' |
8 | import { Hooks } from '@server/lib/plugins/hooks' | ||
8 | import { buildLocalVideoFromReq, buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' | 9 | import { buildLocalVideoFromReq, buildVideoThumbnailsFromReq, setVideoTags } from '@server/lib/video' |
9 | import { videoLiveAddValidator, videoLiveGetValidator, videoLiveUpdateValidator } from '@server/middlewares/validators/videos/video-live' | 10 | import { videoLiveAddValidator, videoLiveGetValidator, videoLiveUpdateValidator } from '@server/middlewares/validators/videos/video-live' |
10 | import { VideoLiveModel } from '@server/models/video/video-live' | 11 | import { 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, |