Skip to content

Commit

Permalink
fixes a bug with the getDynamicValues query param
Browse files Browse the repository at this point in the history
  • Loading branch information
americk0 committed Apr 14, 2021
1 parent bcccb70 commit 56c1c5a
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 56c1c5a

Please sign in to comment.