mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-05-20 12:15:17 +00:00
COVIDSafe code from version 2.6
This commit is contained in:
parent
195798ddd5
commit
f7bfce7eb6
43 changed files with 910 additions and 144 deletions
|
@ -24,10 +24,15 @@ class RestrictionsAPI: CovidSafeAuthenticatedAPI {
|
|||
|
||||
let params = ["state": "\(forState.rawValue.lowercased())"]
|
||||
|
||||
guard let authHeaders = try? authenticatedHeaders() else {
|
||||
completion(nil, .RequestError)
|
||||
return
|
||||
}
|
||||
|
||||
CovidNetworking.shared.session.request("\(apiHost)/restrictions",
|
||||
method: .get,
|
||||
parameters: params,
|
||||
headers: authenticatedHeaders,
|
||||
headers: authHeaders,
|
||||
interceptor: CovidRequestRetrier(retries: 3)
|
||||
).validate().responseDecodable(of: StateRestriction.self) { (response) in
|
||||
switch response.result {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue