Browse Source

deleted

pull/1/head
gme_2 6 years ago
parent
commit
0fc6866469
  1. 6
      GMERemittance/Recipient/ReciepientServcie.swift

6
GMERemittance/Recipient/ReciepientServcie.swift

@ -45,10 +45,10 @@ protocol DeleteRecipientService: ApiServiceType {
extension DeleteRecipientService { extension DeleteRecipientService {
func deleteRecipient(username: String, reciepient: Recipient, success: @escaping (Recipient?) -> (), failure: @escaping (Error) -> ()) { func deleteRecipient(username: String, reciepient: Recipient, success: @escaping (Recipient?) -> (), failure: @escaping (Error) -> ()) {
let url = baseUrl + "mobile/receiver/remove/" + username
let params = ["receiverId": "\(reciepient.recipientId ?? "")"]
let url = baseUrl + "mobile/receiver/remove/" + username + "/?receiverId=\(reciepient.recipientId ?? "")"
// let params = ["receiverId": "\(reciepient.recipientId ?? "")"]
auth.request(method: .post, url: url, params: params, encoding: URLEncoding.default, success: { (response: RecipientContainer) in
auth.request(method: .post, url: url, params: nil, encoding: URLEncoding.default, success: { (response: RecipientContainer) in
if (response.errorCode ?? "") == "1" { if (response.errorCode ?? "") == "1" {
let error = NSError.init(domain: "Network", code: 0, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""]) let error = NSError.init(domain: "Network", code: 0, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""])
failure(error) failure(error)

Loading…
Cancel
Save