aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/comment.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos/comment.ts')
-rw-r--r--server/controllers/api/videos/comment.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/comment.ts b/server/controllers/api/videos/comment.ts
index 23bba9089..47fa2f2e2 100644
--- a/server/controllers/api/videos/comment.ts
+++ b/server/controllers/api/videos/comment.ts
@@ -192,7 +192,7 @@ async function addVideoCommentThread (req: express.Request, res: express.Respons
192 Notifier.Instance.notifyOnNewComment(comment) 192 Notifier.Instance.notifyOnNewComment(comment)
193 auditLogger.create(getAuditIdFromRes(res), new CommentAuditView(comment.toFormattedJSON())) 193 auditLogger.create(getAuditIdFromRes(res), new CommentAuditView(comment.toFormattedJSON()))
194 194
195 Hooks.runAction('action:api.video-thread.created', { comment }) 195 Hooks.runAction('action:api.video-thread.created', { comment, req, res })
196 196
197 return res.json({ comment: comment.toFormattedJSON() }) 197 return res.json({ comment: comment.toFormattedJSON() })
198} 198}
@@ -214,7 +214,7 @@ async function addVideoCommentReply (req: express.Request, res: express.Response
214 Notifier.Instance.notifyOnNewComment(comment) 214 Notifier.Instance.notifyOnNewComment(comment)
215 auditLogger.create(getAuditIdFromRes(res), new CommentAuditView(comment.toFormattedJSON())) 215 auditLogger.create(getAuditIdFromRes(res), new CommentAuditView(comment.toFormattedJSON()))
216 216
217 Hooks.runAction('action:api.video-comment-reply.created', { comment }) 217 Hooks.runAction('action:api.video-comment-reply.created', { comment, req, res })
218 218
219 return res.json({ comment: comment.toFormattedJSON() }) 219 return res.json({ comment: comment.toFormattedJSON() })
220} 220}
@@ -222,7 +222,7 @@ async function addVideoCommentReply (req: express.Request, res: express.Response
222async function removeVideoComment (req: express.Request, res: express.Response) { 222async function removeVideoComment (req: express.Request, res: express.Response) {
223 const videoCommentInstance = res.locals.videoCommentFull 223 const videoCommentInstance = res.locals.videoCommentFull
224 224
225 await removeComment(videoCommentInstance) 225 await removeComment(videoCommentInstance, req, res)
226 226
227 auditLogger.delete(getAuditIdFromRes(res), new CommentAuditView(videoCommentInstance.toFormattedJSON())) 227 auditLogger.delete(getAuditIdFromRes(res), new CommentAuditView(videoCommentInstance.toFormattedJSON()))
228 228