diff --git a/package.json b/package.json index afe8a7f..2803713 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aws-api-gateway-client", - "version": "0.3.2", + "version": "0.3.3", "description": "A module for AWS API Gateway client", "repository": { "type": "git", diff --git a/src/lib/apiGatewayCore/sigV4Client.js b/src/lib/apiGatewayCore/sigV4Client.js index 25ab807..c7cefc8 100755 --- a/src/lib/apiGatewayCore/sigV4Client.js +++ b/src/lib/apiGatewayCore/sigV4Client.js @@ -67,7 +67,7 @@ sigV4ClientFactory.newClient = function(config) { let sortedQueryParams = []; for (let property in queryParams) { - if (Object.prototype.hasOwnProperty.call(queryParams, "property")) { + if (Object.prototype.hasOwnProperty.call(queryParams, property)) { sortedQueryParams.push(property); } } @@ -91,7 +91,7 @@ sigV4ClientFactory.newClient = function(config) { let canonicalHeaders = ''; let sortedKeys = []; for (let property in headers) { - if (Object.prototype.hasOwnProperty.call(headers, "property")) { + if (Object.prototype.hasOwnProperty.call(headers, property)) { sortedKeys.push(property); } } @@ -106,7 +106,7 @@ sigV4ClientFactory.newClient = function(config) { function buildCanonicalSignedHeaders(headers) { let sortedKeys = []; for (let property in headers) { - if (Object.prototype.hasOwnProperty.call(headers, "property")) { + if (Object.prototype.hasOwnProperty.call(headers, property)) { sortedKeys.push(property.toLowerCase()); } } diff --git a/src/lib/apiGatewayCore/simpleHttpClient.js b/src/lib/apiGatewayCore/simpleHttpClient.js index db4ff58..f9074cc 100755 --- a/src/lib/apiGatewayCore/simpleHttpClient.js +++ b/src/lib/apiGatewayCore/simpleHttpClient.js @@ -27,7 +27,7 @@ simpleHttpClientFactory.newClient = (config) => { let canonicalQueryString = ''; for (let property in queryParams) { - if (Object.prototype.hasOwnProperty.call(queryParams, "property")) { + if (Object.prototype.hasOwnProperty.call(queryParams, property)) { canonicalQueryString += encodeURIComponent(property) + '=' + encodeURIComponent(queryParams[property]) + '&'; } diff --git a/src/lib/apiGatewayCore/utils.js b/src/lib/apiGatewayCore/utils.js index d2b59fa..a2f8bd0 100755 --- a/src/lib/apiGatewayCore/utils.js +++ b/src/lib/apiGatewayCore/utils.js @@ -63,7 +63,7 @@ const utils = { let copy = obj.constructor(); let attr = null; for (attr in obj) { - if (Object.prototype.hasOwnProperty.call(obj, "attr")) copy[attr] = obj[attr]; + if (Object.prototype.hasOwnProperty.call(obj, attr)) copy[attr] = obj[attr]; } return copy; }, @@ -72,11 +72,11 @@ const utils = { let merged = baseObj.constructor(); let attr = null; for (attr in baseObj) { - if (Object.prototype.hasOwnProperty.call(baseObj, "attr")) merged[attr] = baseObj[attr]; + if (Object.prototype.hasOwnProperty.call(baseObj, attr)) merged[attr] = baseObj[attr]; } if (null == additionalProps || 'object' != typeof additionalProps) return baseObj; for (attr in additionalProps) { - if (Object.prototype.hasOwnProperty.call(additionalProps, "attr")) { + if (Object.prototype.hasOwnProperty.call(additionalProps, attr)) { merged[attr] = additionalProps[attr]; } }