fix: correct parameter name mismatches in sidebar CRUD invoke calls
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 2m47s

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) <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell 2026-03-24 17:20:47 -04:00
parent ffe79e9a54
commit 76c5ddbfb5

View File

@ -136,7 +136,7 @@ async function addGroup(): Promise<void> {
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<void> {
async function deleteConnection(conn: Connection): Promise<void> {
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<void> {
async function deleteGroup(group: Group): Promise<void> {
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);