COVIDSafe code from version 2.6 (#51)

This commit is contained in:
COVIDSafe Support 2021-05-12 17:39:38 -07:00 committed by GitHub
parent 195798ddd5
commit 4d98b6c5e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 910 additions and 144 deletions

View file

@ -20,10 +20,15 @@ class StatisticsAPI: CovidSafeAuthenticatedAPI {
let parameters = ["state" : "\(forState.rawValue)"]
guard let authHeaders = try? authenticatedHeaders() else {
completion(nil, .RequestError)
return
}
CovidNetworking.shared.session.request("\(apiHost)/v2/statistics",
method: .get,
parameters: parameters,
headers: authenticatedHeaders,
headers: authHeaders,
interceptor: CovidRequestRetrier(retries: 3)
).validate().responseDecodable(of: StatisticsResponse.self) { (response) in
switch response.result {