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
|
@ -22,17 +22,13 @@ class RestrictionsAPI: CovidSafeAuthenticatedAPI {
|
|||
return
|
||||
}
|
||||
|
||||
guard let headers = try? authenticatedHeaders() else {
|
||||
completion(nil, .TokenExpiredError)
|
||||
return
|
||||
}
|
||||
|
||||
let params = ["state": "\(forState.rawValue.lowercased())"]
|
||||
|
||||
CovidNetworking.shared.session.request("\(apiHost)/restrictions",
|
||||
method: .get,
|
||||
parameters: params,
|
||||
headers: headers
|
||||
headers: authenticatedHeaders,
|
||||
interceptor: CovidRequestRetrier(retries: 3)
|
||||
).validate().responseDecodable(of: StateRestriction.self) { (response) in
|
||||
switch response.result {
|
||||
case .success:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue