]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/videos/video-comments.ts
Merge branch 'release/2.1.0' into develop
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / videos / video-comments.ts
index eb07d94309e352164aa68d64e045f49a284f9955..da2fafb10aaa32d6033244187b2fda2c5a72367a 100644 (file)
@@ -50,7 +50,7 @@ const addVideoCommentThreadValidator = [
     if (areValidationErrors(req, res)) return
     if (!await doesVideoExist(req.params.videoId, res)) return
     if (!isVideoCommentsEnabled(res.locals.videoAll, res)) return
-    if (!await isVideoCommentAccepted(req, res, res.locals.videoAll,false)) return
+    if (!await isVideoCommentAccepted(req, res, res.locals.videoAll, false)) return
 
     return next()
   }
@@ -134,7 +134,7 @@ async function doesVideoCommentThreadExist (idArg: number | string, video: MVide
 
   if (videoComment.videoId !== video.id) {
     res.status(400)
-      .json({ error: 'Video comment is associated to this video.' })
+      .json({ error: 'Video comment is not associated to this video.' })
       .end()
 
     return false
@@ -166,7 +166,7 @@ async function doesVideoCommentExist (idArg: number | string, video: MVideoId, r
 
   if (videoComment.videoId !== video.id) {
     res.status(400)
-      .json({ error: 'Video comment is associated to this video.' })
+      .json({ error: 'Video comment is not associated to this video.' })
       .end()
 
     return false