From 4f3814808791d8f380e75d152e0e14a01b758b9a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 23 Sep 2022 15:32:56 +0200 Subject: Add akismet tests --- server/middlewares/validators/videos/video-comments.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/middlewares') 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 const acceptParameters = { video, commentBody: req.body, - user: res.locals.oauth.token.User + user: res.locals.oauth.token.User, + req } let acceptedResult: AcceptResult @@ -234,7 +235,7 @@ async function isVideoCommentAccepted (req: express.Request, res: express.Respon res.fail({ status: HttpStatusCode.FORBIDDEN_403, - message: acceptedResult?.errorMessage || 'Refused local comment' + message: acceptedResult?.errorMessage || 'Comment has been rejected.' }) return false } -- cgit v1.2.3