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("Bearer \(token)", forHTTPHeaderField: "Authorization")
let json: [String: String] = [
"result": responseBet,
]
if let jsonData = try? JSONSerialization.data(withJSONObject: json, options: []){
URLSession.shared.uploadTask(with: request, from: jsonData) { data, response, error in
URLSession.shared.uploadTask(with: request, from: responseBet.data(using: .utf8)) { data, response, error in
print ("ALLIN : add response " + responseBet + " for the bet Id " + id)
if let httpResponse = response as? HTTPURLResponse {
print(httpResponse.statusCode)
}
}.resume()
}
}
}

Loading…
Cancel
Save