Use versioned API client for server summary
This commit is contained in:
@@ -102,8 +102,10 @@ struct ServerFormView: View {
|
||||
let host = hostname.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
let key = apiKey.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
|
||||
let pinger = ServerAPI(hostname: host, apiKey: key)
|
||||
connectionOK = await pinger.ping()
|
||||
let reachable = await PingService.ping(hostname: host, apiKey: key)
|
||||
await MainActor.run {
|
||||
connectionOK = reachable
|
||||
}
|
||||
//
|
||||
// guard let url = URL(string: "https://\(host)/api/v2/ping") else {
|
||||
// print("❌ Invalid URL")
|
||||
|
||||
Reference in New Issue
Block a user