From 17eb89297631b19c850fa262660d18077fc22701 Mon Sep 17 00:00:00 2001 From: gme_2 Date: Tue, 19 Mar 2019 17:29:40 +0900 Subject: [PATCH] api for detail --- .../Application Logic/Service/ResendExchangeService.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GMERemittance/Module/ResendExchange/Application Logic/Service/ResendExchangeService.swift b/GMERemittance/Module/ResendExchange/Application Logic/Service/ResendExchangeService.swift index 2f88f6c1..545dbce0 100644 --- a/GMERemittance/Module/ResendExchange/Application Logic/Service/ResendExchangeService.swift +++ b/GMERemittance/Module/ResendExchange/Application Logic/Service/ResendExchangeService.swift @@ -21,14 +21,14 @@ class ResendExchangeService: ResendExchangeServiceType { protocol FetchResendDetailService: ApiServiceType { - func fetch(transactionId: String, success: @escaping (SendMoneyReciept?) -> (), failure: @escaping (Error) -> ()) + func fetch(transactionId: String, success: @escaping (ResendExchangeRate?) -> (), failure: @escaping (Error) -> ()) } extension FetchResendDetailService { - func fetch(transactionId: String, success: @escaping (SendMoneyReciept?) -> (), failure: @escaping (Error) -> ()) { - let url = oldBaseUrl + "mobile/receipt/" + transactionId - self.auth.request(method: .post, url: url, params: nil, success: { (response: SendMoneyRecieptContainer) in + func fetch(transactionId: String, success: @escaping (ResendExchangeRate?) -> (), failure: @escaping (Error) -> ()) { + let url = baseUrl + "v1/resend/detail/" + "\(transactionId)" + self.auth.request(method: .get, url: url, params: nil, success: { (response: ResendDetailModelContainer) in if (response.errorCode ?? "") == "1" { let error = NSError.init(domain: "Network", code: 0, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""]) failure(error)