refactor(cloud): Simplify cloud URL configuration RPC method

- Update rpcSetCloudUrl to return only an error
- Remove unnecessary boolean return value
- Improve error handling consistency
This commit is contained in:
Adam Shiervani 2025-02-28 10:51:25 +01:00
parent ba3834b95f
commit c0c196eaf8
1 changed files with 3 additions and 3 deletions

View File

@ -753,15 +753,15 @@ func rpcSetSerialSettings(settings SerialSettings) error {
return nil
}
func rpcSetCloudUrl(apiUrl string, appUrl string) (bool, error) {
func rpcSetCloudUrl(apiUrl string, appUrl string) error {
config.CloudURL = apiUrl
config.CloudAppURL = appUrl
if err := SaveConfig(); err != nil {
return false, fmt.Errorf("failed to save config: %w", err)
return fmt.Errorf("failed to save config: %w", err)
}
return true, nil
return nil
}
var rpcHandlers = map[string]RPCHandler{