From 21c2d511eb0f8cbf7f80ec130905d044447a42e9 Mon Sep 17 00:00:00 2001 From: Gabriel Engel Date: Tue, 13 Dec 2016 11:51:06 -0200 Subject: [PATCH] added JSON.parse --- packages/rocketchat-integrations/server/api/api.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rocketchat-integrations/server/api/api.coffee b/packages/rocketchat-integrations/server/api/api.coffee index dadc14439e5..704e859972f 100644 --- a/packages/rocketchat-integrations/server/api/api.coffee +++ b/packages/rocketchat-integrations/server/api/api.coffee @@ -54,7 +54,7 @@ Api = new Restivus payloadIsWrapped = @bodyParams?.payload? and payloadKeys.length == 1 if payloadIsWrapped and @request.headers['content-type'] is 'application/x-www-form-urlencoded' - @bodyParams = @bodyParams.payload + @bodyParams = JSON.parse @bodyParams.payload @integration = RocketChat.models.Integrations.findOne _id: @request.params.integrationId