zocrmsdkmiblu 0.2.9 → 0.2.11

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.
Files changed (2) hide show
  1. package/lib/js/util.js +5 -8
  2. package/package.json +1 -1
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.9",
3
+ "version": "0.2.11",
4
4
  "author": "Julio Bodero",
5
5
  "license": "MIT",
6
6
  "dependencies": {