diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-22 11:14:58 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | 6691c52280363fc42f7865230ebb3741f02fff23 (patch) | |
tree | 071f9a4d7814c46dcfec100268cb0a0cc76e5204 /server/middlewares | |
parent | 89cd12756035a146bbcc4db78cd3cd64f2f3d88d (diff) | |
download | PeerTube-6691c52280363fc42f7865230ebb3741f02fff23.tar.gz PeerTube-6691c52280363fc42f7865230ebb3741f02fff23.tar.zst PeerTube-6691c52280363fc42f7865230ebb3741f02fff23.zip |
Add filter hooks tests
Diffstat (limited to 'server/middlewares')
-rw-r--r-- | server/middlewares/validators/videos/video-comments.ts | 10 |
1 files changed, 6 insertions, 4 deletions
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 | |||
210 | if (isReply) { | 210 | if (isReply) { |
211 | const acceptReplyParameters = Object.assign(acceptParameters, { parentComment: res.locals.videoComment }) | 211 | const acceptReplyParameters = Object.assign(acceptParameters, { parentComment: res.locals.videoComment }) |
212 | 212 | ||
213 | acceptedResult = await Hooks.wrapObject( | 213 | acceptedResult = await Hooks.wrapFun( |
214 | isLocalVideoCommentReplyAccepted(acceptReplyParameters), | 214 | isLocalVideoCommentReplyAccepted, |
215 | acceptReplyParameters, | ||
215 | 'filter:api.video-comment-reply.create.accept.result' | 216 | 'filter:api.video-comment-reply.create.accept.result' |
216 | ) | 217 | ) |
217 | } else { | 218 | } else { |
218 | acceptedResult = await Hooks.wrapObject( | 219 | acceptedResult = await Hooks.wrapFun( |
219 | isLocalVideoThreadAccepted(acceptParameters), | 220 | isLocalVideoThreadAccepted, |
221 | acceptParameters, | ||
220 | 'filter:api.video-thread.create.accept.result' | 222 | 'filter:api.video-thread.create.accept.result' |
221 | ) | 223 | ) |
222 | } | 224 | } |