From 8e7052e012a30915e80e0ebbb3e41179137f864b Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Wed, 20 Apr 2016 22:03:01 +0530 Subject: [PATCH] adding JSON strigify on payload if contentType is json --- .../public/js/invoker-lib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.service-invoker-utility/public/js/invoker-lib.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.service-invoker-utility/public/js/invoker-lib.js index 1a7c52198b..15679db063 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.service-invoker-utility/public/js/invoker-lib.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.service-invoker-utility/public/js/invoker-lib.js @@ -55,7 +55,7 @@ var invokerUtil = function () { paramValue.actionMethod = methoad; paramValue.actionUrl = url; paramValue.actionPayload = payload; - if(acceptType == "application/json"){ + if(contentType == "application/json"){ paramValue.actionPayload = JSON.stringify(payload); } data.data = JSON.stringify(paramValue);