From 6ff3edbda8fa5c54dc665af3bdda85c241d54200 Mon Sep 17 00:00:00 2001 From: Joao Oliveira Date: Fri, 30 Jul 2021 15:18:20 -0300 Subject: [PATCH] Release 2.0.7 --- CHANGELOG.md | 6 ++++++ index.js | 4 ++++ lib/gn-endpoints.js | 4 ++++ package.json | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d1d8c8..22f871d 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 2.0.7 +- Correção do tratamento interno + +# 2.0.6 +- Ajuste arquivo de credenciais + # 2.0.5 - Correção do tratamento de responses diff --git a/index.js b/index.js index 7be0fc4..59082d5 100644 --- a/index.js +++ b/index.js @@ -14,5 +14,9 @@ module.exports = function (options) { credentials.validateMtls = options.validateMtls; } + if (options.partner_token) { + credentials.partner_token = options.partner_token; + } + return new GnSdk(credentials); }; diff --git a/lib/gn-endpoints.js b/lib/gn-endpoints.js index 60794ed..5c22044 100644 --- a/lib/gn-endpoints.js +++ b/lib/gn-endpoints.js @@ -116,6 +116,10 @@ GnEndpoints.prototype.getParams = function (route) { headers['x-skip-mtls-checking'] = !this.options.validateMtls; + if (this.options.partner_token) { + headers['partner-token'] = this.options.partner_token; + } + var req = { url: [this.options.baseUrl, route, query].join(''), headers: headers, diff --git a/package.json b/package.json index 42b5fd8..c6d1fe4 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "gn-api-sdk-node", "description": "Module for integration with Gerencianet API", - "version": "2.0.6", + "version": "2.0.7", "author": "Gerencianet - Consultoria Tecnica | Palloma Brito | João Vitor Oliveira | Francisco Carvalho", "license": "MIT", "repository": "gerencianet/gn-api-sdk-node",