func getInfoUser (id_users: String, completion: @escaping (([String: String?]) -> ())){
var userInfo = [String:String?]()
guard let url = URL(string: Shared.apiUrl + "users/user.php") else { return }
let postString = "id_users=" + id_users
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.httpBody = postString.data(using: .utf8)
URLSession.shared.dataTask(with: request) {(data, response, error) in
let data = data
do {
let response = try JSONDecoder().decode(responseApi.self, from: data!)
userInfo["firstName"] = response.user[0].first_name
completion(userInfo)
} catch {
print("didnt work")
}
}.resume()
}