iam: fix updateResourceCount API action for account

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2019-12-03 22:51:54 +05:30
parent 7a3d34b36f
commit 06c8743207
2 changed files with 5 additions and 5 deletions

View File

@ -113,7 +113,7 @@ export default {
args: ['account', 'domainid'], args: ['account', 'domainid'],
mapping: { mapping: {
account: { account: {
value: (record) => { return record.account } value: (record) => { return record.name }
}, },
domainid: { domainid: {
value: (record) => { return record.domainid } value: (record) => { return record.domainid }

View File

@ -565,17 +565,17 @@ export default {
} }
} }
console.log(this.currentAction)
if (this.currentAction.mapping) { if (this.currentAction.mapping) {
for (const key in this.currentAction.mapping) { for (const key in this.currentAction.mapping) {
if (!this.currentAction.mapping[key].value) { if (!this.currentAction.mapping[key].value) {
continue continue
} }
var keyName = this.currentAction.mapping[key].rename ? this.currentAction.mapping[key].rename : key params[key] = this.currentAction.mapping[key].value(this.resource, params)
params[keyName] = this.currentAction.mapping[key].value(this.resource, params)
} }
} }
console.log(this.currentAction)
console.log(this.resource)
console.log(params) console.log(params)
var hasJobId = false var hasJobId = false