Skip to content

Commit

Permalink
fixes more bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
americk0 committed Apr 20, 2021
1 parent e165a5e commit 7d0b339
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/alks.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ class alks {
getLoginRole(props) {
const {accountId, role} = props;
return this._doFetch(`loginRoles/id/${accountId}/${role}`, null, 'GET').then((results) =>
pick(results, ['account', 'role', 'iamKeyActive', 'maxKeyDuration']))
pick(results.loginRole, ['account', 'role', 'iamKeyActive', 'maxKeyDuration']))
}

/**
Expand Down
2 changes: 1 addition & 1 deletion dist/alks.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ class alks {
getLoginRole(props) {
const {accountId, role} = props;
return this._doFetch(`loginRoles/id/${accountId}/${role}`, null, 'GET').then((results) =>
pick(results, ['account', 'role', 'iamKeyActive', 'maxKeyDuration']))
pick(results.loginRole, ['account', 'role', 'iamKeyActive', 'maxKeyDuration']))
}

/**
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.

2 changes: 1 addition & 1 deletion dist/alks.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@
alks.prototype.getLoginRole = function getLoginRole (props) {
var accountId = props.accountId;
var role = props.role;
return this._doFetch(("loginRoles/id/" + accountId + "/" + role), null, 'GET').then(function (results) { return pick(results, ['account', 'role', 'iamKeyActive', 'maxKeyDuration']); })
return this._doFetch(("loginRoles/id/" + accountId + "/" + role), null, 'GET').then(function (results) { return pick(results.loginRole, ['account', 'role', 'iamKeyActive', 'maxKeyDuration']); })
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/alks.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ class alks {
getLoginRole(props) {
const {accountId, role} = props
return this._doFetch(`loginRoles/id/${accountId}/${role}`, null, 'GET').then((results) =>
pick(results, ['account', 'role', 'iamKeyActive', 'maxKeyDuration']))
pick(results.loginRole, ['account', 'role', 'iamKeyActive', 'maxKeyDuration']))
}

/**
Expand Down
10 changes: 6 additions & 4 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,10 +716,12 @@ describe('alks.js', function() {

const _fetch = fetchMock.sandbox().mock(`${baseUrl}/loginRoles/id/${accountId}/${role}`, {
body: {
account,
role,
iamKeyActive,
maxKeyDuration
loginRole: {
account,
role,
iamKeyActive,
maxKeyDuration
}
},
status: 200
})
Expand Down

0 comments on commit 7d0b339

Please sign in to comment.