Use versioned API client for server summary

This commit is contained in:
Micha
2025-11-16 12:59:05 +01:00
parent d818af18bb
commit df32af064d
7 changed files with 233 additions and 13 deletions

View File

@@ -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")