From de1ca1d12ac8f347b82ce732f45c7e07ccf09d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Manelli?= Date: Fri, 29 Sep 2017 18:40:44 -0300 Subject: Send result before webhook --- models/cardComments.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'models/cardComments.js') diff --git a/models/cardComments.js b/models/cardComments.js index 352030f1..cc1c55bc 100644 --- a/models/cardComments.js +++ b/models/cardComments.js @@ -125,15 +125,15 @@ if (Meteor.isServer) { boardId: paramBoardId, }); - const cardComment = CardComments.findOne({_id: id, cardId:paramCardId, boardId: paramBoardId }); - commentCreation(req.body.authorId, cardComment); - JsonRoutes.sendResult(res, { code: 200, data: { _id: id, }, }); + + const cardComment = CardComments.findOne({_id: id, cardId:paramCardId, boardId: paramBoardId }); + commentCreation(req.body.authorId, cardComment); }); JsonRoutes.add('DELETE', '/api/boards/:boardId/cards/:cardId/comments/:commentId', function (req, res, next) { -- cgit v1.2.3-1-g7c22