Skip to content

Commit

Permalink
fix(entities-vaults): edit konnect vault
Browse files Browse the repository at this point in the history
  • Loading branch information
Leopoldthecoder committed Sep 9, 2024
1 parent 1846225 commit a64a6e2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/entities/entities-vaults/src/components/VaultForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ const updateFormValues = (data: Record<string, any>): void => {
if (config && (Object.keys(config).length || data?.name === VaultProviders.KONNECT)) {
vaultProvider.value = data?.item?.name || data?.name || ''
originalVaultProvider.value = vaultProvider.value
configStoreId.value = data?.config_store_id || undefined
configStoreId.value = data?.config?.config_store_id || undefined
Object.assign(configFields[vaultProvider.value], config)
Object.assign(originalConfigFields[vaultProvider.value], config)
Expand Down Expand Up @@ -1080,7 +1080,13 @@ const saveFormData = async (): Promise<void> => {
})
} else {
response = props.config?.app === 'konnect'
? await axiosInstance.put(submitUrl.value, { ...getPayload.value, config_store_id: configStoreId.value })
? await axiosInstance.put(submitUrl.value, {
...getPayload.value,
config: {
...getPayload.value.config,
config_store_id: configStoreId.value,
},
})
: await axiosInstance.patch(submitUrl.value, getPayload.value)
}
}
Expand Down

0 comments on commit a64a6e2

Please sign in to comment.