fix: cannot save duplicate connection #24

This commit is contained in:
tiny-craft 2023-09-27 19:34:24 +08:00
parent ca1e1e5ffe
commit ebacf2bd57
1 changed files with 4 additions and 1 deletions

View File

@ -80,7 +80,10 @@ const onSaveConnection = async () => {
}) })
// store new connection // store new connection
const { success, msg } = await connectionStore.saveConnection(editName.value, generalForm.value) const { success, msg } = await connectionStore.saveConnection(
isEditMode.value ? editName.value : null,
generalForm.value,
)
if (!success) { if (!success) {
$message.error(msg) $message.error(msg)
return return