zocrmsdkmiblu 0.2.8 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,7 +42,7 @@ var settings = function settings()
42
42
  },
43
43
  updateVariableCRM : function (input)
44
44
  {
45
- return util.promiseResponse(util.constructRequestDetails(input, "settings/variables/{id}", HTTP_METHODS.PUT, true));//No I18N
45
+ return util.promiseResponse(util.constructRequestDetails(input, "settings/variables/{id}", HTTP_METHODS.PUT, false));//No I18N
46
46
  },
47
47
  getVariableCRM : function (input)
48
48
  {
@@ -300,6 +300,7 @@ var settings = function settings()
300
300
  {
301
301
  return util.promiseResponse(util.constructRequestDetails(input, "settings/users/bulk_update", HTTP_METHODS.PUT, true));//No I18N
302
302
  },
303
+
303
304
  }
304
305
  }
305
306
 
package/lib/js/util.js CHANGED
@@ -85,7 +85,7 @@ function makeapicall(request) {
85
85
  api_headers.Authorization = 'Zoho-oauthtoken ' + access_token;
86
86
  api_headers["User-Agent"] = 'Zoho CRM Node SDK';
87
87
 
88
- /* console.log({
88
+ console.log({
89
89
 
90
90
  uri: baseUrl,
91
91
  method: request.type,
@@ -93,7 +93,7 @@ function makeapicall(request) {
93
93
  body: req_body,
94
94
  encoding: encoding
95
95
 
96
- },crmclient.getVersion(allrecords)); */
96
+ },crmclient.getVersion(allrecords));
97
97
  httpclient({
98
98
 
99
99
  uri: baseUrl,
@@ -220,9 +220,8 @@ function constructRequestDetails(input, url, type, isModuleParam) {
220
220
 
221
221
 
222
222
  var params = {};
223
- if (input.params) {
224
-
225
- params = input.params;
223
+ if (input.params && Object.keys(input.params).length > 0) {
224
+ requestDetails.params = createParams(input.params) + (input.module && isModuleParam ? "module=" + input.module : "");//No I18N
226
225
  }
227
226
  params.auth_type = "apikey";
228
227
  input.params = params;
@@ -232,7 +231,7 @@ function constructRequestDetails(input, url, type, isModuleParam) {
232
231
  url = url.replace("/{api_name}", "");
233
232
 
234
233
  }
235
- if (input.params) {
234
+ if (input.params && Object.keys(input.params).length > 0) {
236
235
  requestDetails.params = createParams(input.params) + (input.module && isModuleParam ? "module=" + input.module : "");//No I18N
237
236
  }
238
237
  if (!requestDetails.params && isModuleParam) {
@@ -256,8 +255,6 @@ function constructRequestDetails(input, url, type, isModuleParam) {
256
255
  requestDetails.url = url;
257
256
 
258
257
  return requestDetails;
259
-
260
-
261
258
  }
262
259
 
263
260
  module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zocrmsdkmiblu",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "author": "Julio Bodero",
5
5
  "license": "MIT",
6
6
  "dependencies": {