From 67b1675850cd1a2bc5134eb052978c6e47070532 Mon Sep 17 00:00:00 2001 From: Jan <17313367+JW-CH@users.noreply.github.com> Date: Fri, 16 Feb 2024 22:01:44 +0100 Subject: [PATCH] fix(web) display wrong apikey-name on edit (#7131) * fix display wrong apikey-name on edit * use apiKey property with fallback value * remove null fallback * chore: cleanup --------- Co-authored-by: Jason Rasmussen --- web/src/lib/components/forms/api-key-form.svelte | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/web/src/lib/components/forms/api-key-form.svelte b/web/src/lib/components/forms/api-key-form.svelte index 53283d9b91..62034d651c 100644 --- a/web/src/lib/components/forms/api-key-form.svelte +++ b/web/src/lib/components/forms/api-key-form.svelte @@ -11,7 +11,6 @@ export let title = 'API Key'; export let cancelText = 'Cancel'; export let submitText = 'Save'; - export let apiKeyName = 'API Key'; const dispatch = createEventDispatcher<{ cancel: void; @@ -19,8 +18,8 @@ }>(); const handleCancel = () => dispatch('cancel'); const handleSubmit = () => { - if (apiKeyName) { - dispatch('submit', { ...apiKey, name: apiKeyName }); + if (apiKey.name) { + dispatch('submit', apiKey); } else { notificationController.show({ message: "Your API Key name shouldn't be empty", @@ -46,7 +45,7 @@
- +