fix: Treat credential library attributes as an object

This commit is contained in:
Susmitha Girumala committed 2021-07-19 12:05:40 -04:00
1 parent 45fc58fe75
commit 98e14a642f
5 files changed
+13 -35

No files matched your search

@@ -47,7 +47,7 @@
<form.input
@name='vault_path'
@type='text'
@value={{@model.attributes_path}}
@value={{@model.attributes.path}}
@label={{t 'form.vault_path.label'}}
@error={{@model.errors.name}}
@helperText={{t 'form.vault_path.help'}}
@@ -65,8 +65,8 @@
<form.radioGroup
@name='http_method'
@selectedValue={{@model.attributes_http_method}}
@changed={{fn (mut @model.attributes_http_method)}}
@selectedValue={{@model.attributes.http_method}}
@changed={{fn (mut @model.attributes.http_method)}}
as |radioGroup|
>
{{#each this.httpMethods as |httpMethod|}}
@@ -78,7 +78,7 @@
<form.textarea
@name='http_request_body'
@type='text'
@value={{@model.attributes_http_request_body}}
@value={{@model.attributes.http_request_body}}
@label={{t 'form.http_request_body.label'}}
@error={{@model.errors.description}}
@helperText={{t 'form.http_request_body.help'}}
@@ -13,8 +13,8 @@ export default class FormCredentialLibraryIndexComponent extends Component {
* Only allow HTTP request body field if http_method is set to POST.
* @type {boolean}
*/
@computed('args.model.attributes_http_method')
@computed('args.model.attributes.http_method')
get isHttpRequestBodyAllowed() {
return this.args.model.attributes_http_method?.match(/post/i);
return this.args.model.attributes.http_method?.match(/post/i);
}
}