- resultList = await VideoCommentModel.listThreadsForApi(video.id, req.query.start, req.query.count, req.query.sort, user)
+ const apiOptions = await Hooks.wrapObject({
+ videoId: video.id,
+ start: req.query.start,
+ count: req.query.count,
+ sort: req.query.sort,
+ user: user
+ }, 'filter:api.video-threads.list.params')
+
+ resultList = await Hooks.wrapPromise(
+ VideoCommentModel.listThreadsForApi(apiOptions),
+ 'filter:api.video-threads.list.result'
+ )