From fb3a46acba9e514a4dd963d22a0a5928503b1939 Mon Sep 17 00:00:00 2001 From: Sissi Chen Date: Mon, 26 Jun 2017 11:41:46 -0700 Subject: [PATCH] Changed the response object --- forceng.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/forceng.js b/forceng.js index 7b4fc36..139fcae 100644 --- a/forceng.js +++ b/forceng.js @@ -437,8 +437,11 @@ angular.module('forceng', []) params: obj.params, data: obj.data, timeout: 30000 - }).then(function (data, status, headers, config) { - deferred.resolve(data); + }).then(function (response) { + if (response.data) { + response = response.data; + } + deferred.resolve(response); }, function (data, status, headers, config) { if ((status === 401 || status === 403) && oauth.refresh_token) { refreshToken()