aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index fc1bcc73d..61a030ba1 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -158,7 +158,7 @@ async function viewVideo (req: express.Request, res: express.Response) {
158 const serverActor = await getServerActor() 158 const serverActor = await getServerActor()
159 await sendView(serverActor, video, undefined) 159 await sendView(serverActor, video, undefined)
160 160
161 Hooks.runAction('action:api.video.viewed', { video: video, ip }) 161 Hooks.runAction('action:api.video.viewed', { video: video, ip, req, res })
162 } 162 }
163 163
164 return res.status(HttpStatusCode.NO_CONTENT_204).end() 164 return res.status(HttpStatusCode.NO_CONTENT_204).end()
@@ -201,7 +201,7 @@ async function listVideos (req: express.Request, res: express.Response) {
201 return res.json(getFormattedObjects(resultList.data, resultList.total, guessAdditionalAttributesFromQuery(query))) 201 return res.json(getFormattedObjects(resultList.data, resultList.total, guessAdditionalAttributesFromQuery(query)))
202} 202}
203 203
204async function removeVideo (_req: express.Request, res: express.Response) { 204async function removeVideo (req: express.Request, res: express.Response) {
205 const videoInstance = res.locals.videoAll 205 const videoInstance = res.locals.videoAll
206 206
207 await sequelizeTypescript.transaction(async t => { 207 await sequelizeTypescript.transaction(async t => {
@@ -211,7 +211,7 @@ async function removeVideo (_req: express.Request, res: express.Response) {
211 auditLogger.delete(getAuditIdFromRes(res), new VideoAuditView(videoInstance.toFormattedDetailsJSON())) 211 auditLogger.delete(getAuditIdFromRes(res), new VideoAuditView(videoInstance.toFormattedDetailsJSON()))
212 logger.info('Video with name %s and uuid %s deleted.', videoInstance.name, videoInstance.uuid) 212 logger.info('Video with name %s and uuid %s deleted.', videoInstance.name, videoInstance.uuid)
213 213
214 Hooks.runAction('action:api.video.deleted', { video: videoInstance }) 214 Hooks.runAction('action:api.video.deleted', { video: videoInstance, req, res })
215 215
216 return res.type('json') 216 return res.type('json')
217 .status(HttpStatusCode.NO_CONTENT_204) 217 .status(HttpStatusCode.NO_CONTENT_204)