fix: health API uses JWT auth, Finance tab replaced with Health
This commit is contained in:
@@ -177,11 +177,9 @@ struct HealthView: View {
|
||||
func loadData(refresh: Bool = false) async {
|
||||
if !refresh { isLoading = true }
|
||||
|
||||
let apiKey = authManager.healthApiKey
|
||||
|
||||
async let r = HealthAPIService.shared.getReadiness(apiKey: apiKey)
|
||||
async let l = HealthAPIService.shared.getLatest(apiKey: apiKey)
|
||||
async let h = HealthAPIService.shared.getHeatmap(apiKey: apiKey, days: 7)
|
||||
async let r = HealthAPIService.shared.getReadiness()
|
||||
async let l = HealthAPIService.shared.getLatest()
|
||||
async let h = HealthAPIService.shared.getHeatmap(days: 7)
|
||||
|
||||
readiness = try? await r
|
||||
latest = try? await l
|
||||
@@ -198,11 +196,6 @@ struct HealthView: View {
|
||||
return
|
||||
}
|
||||
|
||||
guard !authManager.healthApiKey.isEmpty else {
|
||||
showToastMessage("Health API ключ не найден", success: false)
|
||||
return
|
||||
}
|
||||
|
||||
UIImpactFeedbackGenerator(style: .medium).impactOccurred()
|
||||
|
||||
do {
|
||||
|
||||
Reference in New Issue
Block a user