From 6691c52280363fc42f7865230ebb3741f02fff23 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 22 Jul 2019 11:14:58 +0200 Subject: Add filter hooks tests --- server/middlewares/validators/videos/video-comments.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'server/middlewares/validators/videos') diff --git a/server/middlewares/validators/videos/video-comments.ts b/server/middlewares/validators/videos/video-comments.ts index 9c1bfaeaa..6b8e2f318 100644 --- a/server/middlewares/validators/videos/video-comments.ts +++ b/server/middlewares/validators/videos/video-comments.ts @@ -210,13 +210,15 @@ async function isVideoCommentAccepted (req: express.Request, res: express.Respon if (isReply) { const acceptReplyParameters = Object.assign(acceptParameters, { parentComment: res.locals.videoComment }) - acceptedResult = await Hooks.wrapObject( - isLocalVideoCommentReplyAccepted(acceptReplyParameters), + acceptedResult = await Hooks.wrapFun( + isLocalVideoCommentReplyAccepted, + acceptReplyParameters, 'filter:api.video-comment-reply.create.accept.result' ) } else { - acceptedResult = await Hooks.wrapObject( - isLocalVideoThreadAccepted(acceptParameters), + acceptedResult = await Hooks.wrapFun( + isLocalVideoThreadAccepted, + acceptParameters, 'filter:api.video-thread.create.accept.result' ) } -- cgit v1.2.3