Skip to content

Commit

Permalink
Merge pull request #68 from Cox-Automotive/bugfix-dynamic-roles
Browse files Browse the repository at this point in the history
fixes a bug with the getDynamicValues query param
  • Loading branch information
americk0 committed Apr 15, 2021
2 parents bcccb70 + 56c1c5a commit d5a9364
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 45 deletions.
6 changes: 3 additions & 3 deletions dist/alks.cjs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var version = "1.11.2";
var version = "1.11.3";

const Buffer = require('buffer').Buffer;
const fetch = require('node-fetch');
Expand Down Expand Up @@ -224,7 +224,7 @@ class alks {
* })
*/
getAllAWSRoleTypes(props) {
const url = props.getDynamicValues ? 'allAwsRoleTypes' : 'allAwsRoleTypes?getDynamicValues=true';
const url = props.getDynamicValues ? 'allAwsRoleTypes?getDynamicValues=true' : 'allAwsRoleTypes';
return(this._doFetch(url, props, 'GET').then(results => results.roleTypes))
}

Expand Down Expand Up @@ -835,7 +835,7 @@ class alks {
delete opts.sessionToken;
}

var responsePromise = opts._fetch(`${opts.baseUrl}/${path}/`, {
var responsePromise = opts._fetch(`${opts.baseUrl}/${path}`, {
method, headers, body: method == 'GET' ? undefined : JSON.stringify(opts)
});

Expand Down
6 changes: 3 additions & 3 deletions dist/alks.esm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var version = "1.11.2";
var version = "1.11.3";

const fetch = window.fetch.bind(window);

Expand Down Expand Up @@ -221,7 +221,7 @@ class alks {
* })
*/
getAllAWSRoleTypes(props) {
const url = props.getDynamicValues ? 'allAwsRoleTypes' : 'allAwsRoleTypes?getDynamicValues=true';
const url = props.getDynamicValues ? 'allAwsRoleTypes?getDynamicValues=true' : 'allAwsRoleTypes';
return(this._doFetch(url, props, 'GET').then(results => results.roleTypes))
}

Expand Down Expand Up @@ -832,7 +832,7 @@ class alks {
delete opts.sessionToken;
}

var responsePromise = opts._fetch(`${opts.baseUrl}/${path}/`, {
var responsePromise = opts._fetch(`${opts.baseUrl}/${path}`, {
method, headers, body: method == 'GET' ? undefined : JSON.stringify(opts)
});

Expand Down
2 changes: 1 addition & 1 deletion dist/alks.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/alks.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(global = global || self, global.alks = factory());
}(this, function () { 'use strict';

var version = "1.11.2";
var version = "1.11.3";

var fetch = window.fetch.bind(window);

Expand Down Expand Up @@ -227,7 +227,7 @@
* })
*/
alks.prototype.getAllAWSRoleTypes = function getAllAWSRoleTypes (props) {
var url = props.getDynamicValues ? 'allAwsRoleTypes' : 'allAwsRoleTypes?getDynamicValues=true';
var url = props.getDynamicValues ? 'allAwsRoleTypes?getDynamicValues=true' : 'allAwsRoleTypes';
return(this._doFetch(url, props, 'GET').then(function (results) { return results.roleTypes; }))
};

Expand Down Expand Up @@ -829,7 +829,7 @@
delete opts.sessionToken;
}

var responsePromise = opts._fetch(((opts.baseUrl) + "/" + path + "/"), {
var responsePromise = opts._fetch(((opts.baseUrl) + "/" + path), {
method: method, headers: headers, body: method == 'GET' ? undefined : JSON.stringify(opts)
});

Expand Down
2 changes: 1 addition & 1 deletion src/alks.js
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ class alks {
delete opts.sessionToken
}

var responsePromise = opts._fetch(`${opts.baseUrl}/${path}/`, {
var responsePromise = opts._fetch(`${opts.baseUrl}/${path}`, {
method, headers, body: method == 'GET' ? undefined : JSON.stringify(opts)
})

Expand Down
Loading

0 comments on commit d5a9364

Please sign in to comment.