Showing
1 changed file
with
3 additions
and
2 deletions
... | ... | @@ -110,11 +110,12 @@ class AuthService { |
110 | 110 | let params = ["device_uuid": model.deviceUUID] as [String: Any] |
111 | 111 | |
112 | 112 | AF.request(Constants.baseURL + APIRoutes.logoutURL.urlString, method: .post, parameters: params, encoding: JSONEncoding.default, interceptor: interceptor).responseDecodable(of: LogoutResponseModel.self ) { response in |
113 | - | |
113 | + guard let successCode = response.response?.statusCode else { return } | |
114 | 114 | if let error = response.error { |
115 | 115 | fail(error) |
116 | 116 | } else { |
117 | - if let res = response.value { | |
117 | + if successCode == 200 { | |
118 | + guard let res = response.value else { return } | |
118 | 119 | completion(res) |
119 | 120 | } |
120 | 121 | } | ... | ... |
Please
register
or
login
to post a comment