mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-19 13:05:21 +00:00
COVIDSafe code from version 2.4
This commit is contained in:
parent
377bc0009b
commit
86a09a138c
40 changed files with 1125 additions and 657 deletions
|
@ -18,17 +18,13 @@ class StatisticsAPI: CovidSafeAuthenticatedAPI {
|
|||
return
|
||||
}
|
||||
|
||||
guard let headers = try? authenticatedHeaders() else {
|
||||
completion(nil, .TokenExpiredError)
|
||||
return
|
||||
}
|
||||
|
||||
let parameters = ["state" : "\(forState.rawValue)"]
|
||||
|
||||
CovidNetworking.shared.session.request("\(apiHost)/v2/statistics",
|
||||
method: .get,
|
||||
parameters: parameters,
|
||||
headers: headers
|
||||
headers: authenticatedHeaders,
|
||||
interceptor: CovidRequestRetrier(retries: 3)
|
||||
).validate().responseDecodable(of: StatisticsResponse.self) { (response) in
|
||||
switch response.result {
|
||||
case .success:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue