+
+ auditLogger.create(res.locals.oauth.token.User.Account.Actor.getIdentifier(), new CommentAuditView(comment.toFormattedJSON()))
+
+ return res.json({
+ comment: comment.toFormattedJSON()
+ }).end()
+}
+
+async function removeVideoComment (req: express.Request, res: express.Response) {
+ const videoCommentInstance: VideoCommentModel = res.locals.videoComment
+
+ await sequelizeTypescript.transaction(async t => {
+ await videoCommentInstance.destroy({ transaction: t })
+ })
+
+ auditLogger.delete(
+ res.locals.oauth.token.User.Account.Actor.getIdentifier(),
+ new CommentAuditView(videoCommentInstance.toFormattedJSON())
+ )
+ logger.info('Video comment %d deleted.', videoCommentInstance.id)
+
+ return res.type('json').status(204).end()