|
@ -14,20 +14,24 @@ protocol ResendServiceType: class { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protocol FetchResendTransactionList: ApiServiceType { |
|
|
|
|
|
func fetch() |
|
|
|
|
|
|
|
|
protocol FetchResendService: ApiServiceType { |
|
|
|
|
|
func fetchResendService(user: String, param: [String: String]?, success: @escaping (([ResendListModel]) -> ()), failure: @escaping ((Error) -> ())) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
extension FetchResendService { |
|
|
|
|
|
func fetchResendService(user: String, param: [String: String]?, success: @escaping (([ResendListModel]) -> ()), failure: @escaping ((Error) -> ())) { |
|
|
|
|
|
let url = oldBaseUrl + "v1/resend/list" + "\(user)" |
|
|
|
|
|
self.auth.request(method: .post, url: url, params: param, success: { (response: ResendListModelContainer) in |
|
|
|
|
|
if (response.errorCode ?? "") == "1" { |
|
|
|
|
|
let error = NSError.init(domain: "Network", code: 0, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""]) |
|
|
|
|
|
failure(error) |
|
|
|
|
|
}else { |
|
|
|
|
|
let model = response.data |
|
|
|
|
|
success(model ?? []) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
extension FetchResendTransactionList { |
|
|
|
|
|
func fetch() { |
|
|
|
|
|
// http://localhost:9500/api/v1/resend/list |
|
|
|
|
|
let url = baseUrl + "v1/resend/list" |
|
|
|
|
|
|
|
|
|
|
|
auth.request(method: .post, url: url, params: nil, success: { (response: SuccessMessageContainer) in |
|
|
|
|
|
print(response) |
|
|
|
|
|
}) { (error) in |
|
|
}) { (error) in |
|
|
print(error.localizedDescription) |
|
|
|
|
|
|
|
|
failure(error) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|