Fix bet confirmation

pull/29/head^2
avalin 11 months ago
parent 030e3fb2f0
commit 28b0f19619

@ -315,17 +315,11 @@ public struct UserApiManager: UserDataManager {
request.setValue("application/json", forHTTPHeaderField: "Content-Type") request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization") request.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization")
let json: [String: String] = [ URLSession.shared.uploadTask(with: request, from: responseBet.data(using: .utf8)) { data, response, error in
"result": responseBet, print ("ALLIN : add response " + responseBet + " for the bet Id " + id)
] if let httpResponse = response as? HTTPURLResponse {
print(httpResponse.statusCode)
if let jsonData = try? JSONSerialization.data(withJSONObject: json, options: []){ }
URLSession.shared.uploadTask(with: request, from: jsonData) { data, response, error in }.resume()
print ("ALLIN : add response " + responseBet + " for the bet Id " + id)
if let httpResponse = response as? HTTPURLResponse {
print(httpResponse.statusCode)
}
}.resume()
}
} }
} }

Loading…
Cancel
Save