aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-09-23 15:32:56 +0200
committerChocobozzz <me@florianbigard.com>2022-09-23 15:38:21 +0200
commit4f3814808791d8f380e75d152e0e14a01b758b9a (patch)
treebd9778c89e114f2325dfb756f0208c0fe353c212 /server/middlewares/validators/videos
parent255c00305c899d8db829b07b49d06cd2fea7ca02 (diff)
downloadPeerTube-4f3814808791d8f380e75d152e0e14a01b758b9a.tar.gz
PeerTube-4f3814808791d8f380e75d152e0e14a01b758b9a.tar.zst
PeerTube-4f3814808791d8f380e75d152e0e14a01b758b9a.zip
Add akismet tests
Diffstat (limited to 'server/middlewares/validators/videos')
-rw-r--r--server/middlewares/validators/videos/video-comments.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/middlewares/validators/videos/video-comments.ts b/server/middlewares/validators/videos/video-comments.ts
index 69062701b..133feb7bd 100644
--- a/server/middlewares/validators/videos/video-comments.ts
+++ b/server/middlewares/validators/videos/video-comments.ts
@@ -208,7 +208,8 @@ async function isVideoCommentAccepted (req: express.Request, res: express.Respon
208 const acceptParameters = { 208 const acceptParameters = {
209 video, 209 video,
210 commentBody: req.body, 210 commentBody: req.body,
211 user: res.locals.oauth.token.User 211 user: res.locals.oauth.token.User,
212 req
212 } 213 }
213 214
214 let acceptedResult: AcceptResult 215 let acceptedResult: AcceptResult
@@ -234,7 +235,7 @@ async function isVideoCommentAccepted (req: express.Request, res: express.Respon
234 235
235 res.fail({ 236 res.fail({
236 status: HttpStatusCode.FORBIDDEN_403, 237 status: HttpStatusCode.FORBIDDEN_403,
237 message: acceptedResult?.errorMessage || 'Refused local comment' 238 message: acceptedResult?.errorMessage || 'Comment has been rejected.'
238 }) 239 })
239 return false 240 return false
240 } 241 }