From 76c5ddbfb550e064d03681bfa0c226f8e3a32fd7 Mon Sep 17 00:00:00 2001 From: Vantz Stockwell Date: Tue, 24 Mar 2026 17:20:47 -0400 Subject: [PATCH] fix: correct parameter name mismatches in sidebar CRUD invoke calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tauri v2 matches JS keys to Rust parameter names. The frontend was sending connectionId/groupId but Rust expects id. Fixed: - delete_connection: connectionId → id - delete_group: groupId → id - rename_group: groupId → id - create_group: parentId → parent_id Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/sidebar/ConnectionTree.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/sidebar/ConnectionTree.vue b/src/components/sidebar/ConnectionTree.vue index c994aea..aadd952 100644 --- a/src/components/sidebar/ConnectionTree.vue +++ b/src/components/sidebar/ConnectionTree.vue @@ -136,7 +136,7 @@ async function addGroup(): Promise { const name = prompt("New group name:"); if (!name) return; try { - await invoke("create_group", { name, parentId: null }); + await invoke("create_group", { name, parent_id: null }); await connectionStore.loadGroups(); } catch (err) { console.error("Failed to create group:", err); @@ -195,7 +195,7 @@ function showGroupMenu(event: MouseEvent, group: Group): void { const newName = prompt("Rename group:", group.name); if (newName && newName !== group.name) { try { - await invoke("rename_group", { groupId: group.id, name: newName }); + await invoke("rename_group", { id: group.id, name: newName }); await connectionStore.loadGroups(); } catch (err) { console.error("Failed to rename group:", err); @@ -239,7 +239,7 @@ async function duplicateConnection(conn: Connection): Promise { async function deleteConnection(conn: Connection): Promise { if (!confirm(`Delete "${conn.name}"?`)) return; try { - await invoke("delete_connection", { connectionId: conn.id }); + await invoke("delete_connection", { id: conn.id }); await connectionStore.loadConnections(); } catch (err) { console.error("Failed to delete connection:", err); @@ -250,7 +250,7 @@ async function deleteConnection(conn: Connection): Promise { async function deleteGroup(group: Group): Promise { if (!confirm(`Delete group "${group.name}" and all its connections?`)) return; try { - await invoke("delete_group", { groupId: group.id }); + await invoke("delete_group", { id: group.id }); await connectionStore.loadAll(); } catch (err) { console.error("Failed to delete group:", err);