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 @@