mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-06-07 21:15:18 +00:00
COVIDSafe code from version 2.6 (#51)
This commit is contained in:
parent
195798ddd5
commit
4d98b6c5e4
43 changed files with 910 additions and 144 deletions
|
@ -20,11 +20,17 @@ class ChangePostcodeAPI: CovidSafeAuthenticatedAPI {
|
|||
let params = [
|
||||
"postcode": newPostcode,
|
||||
]
|
||||
|
||||
guard let authHeaders = try? authenticatedHeaders() else {
|
||||
completion(.RequestError)
|
||||
return
|
||||
}
|
||||
|
||||
CovidNetworking.shared.session.request("\(apiHost)/device",
|
||||
method: .post,
|
||||
parameters: params,
|
||||
encoding: JSONEncoding.default,
|
||||
headers: authenticatedHeaders,
|
||||
headers: authHeaders,
|
||||
interceptor: CovidRequestRetrier(retries:3)).validate().responseDecodable(of: DeviceResponse.self) { (response) in
|
||||
switch response.result {
|
||||
case .success:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue