|
@ -8,6 +8,8 @@ |
|
|
|
|
|
|
|
|
import Foundation |
|
|
import Foundation |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protocol HomeServiceType: class, UserInfoService { |
|
|
protocol HomeServiceType: class, UserInfoService { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
@ -22,7 +24,7 @@ extension UserInfoService { |
|
|
let url = baseUrl + "mobile/CustomerProfile" |
|
|
let url = baseUrl + "mobile/CustomerProfile" |
|
|
auth.request(method: .post, url: url, params: param, success: { (response: UserContainer ) in |
|
|
auth.request(method: .post, url: url, params: param, success: { (response: UserContainer ) 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: AppConstants.emergencyLogoutErrorCode, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""]) |
|
|
failure(error) |
|
|
failure(error) |
|
|
}else { |
|
|
}else { |
|
|
if let model = response.data { |
|
|
if let model = response.data { |
|
|