diff --git a/src/lib/commands.ts b/src/lib/commands.ts index 90e8c50..3fa4369 100644 --- a/src/lib/commands.ts +++ b/src/lib/commands.ts @@ -1655,7 +1655,14 @@ export const giteaDeleteInstance = (id: string) => export const giteaUpdateInstance = ( id: string, fields: { name?: string; url?: string; access_token?: string; is_default?: boolean } -) => invoke("gitea_update_instance", { id, ...fields }); + // Tauri 命令参数按 camelCase 匹配 Rust snake_case,直接展开 snake_case 字段会被静默丢弃 +) => invoke("gitea_update_instance", { + id, + name: fields.name, + url: fields.url, + accessToken: fields.access_token, + isDefault: fields.is_default, +}); export const giteaTestConnection = (instanceId: string) => invoke("gitea_test_connection", { instanceId });