Commenting out the code to parse events

pull/68/head
Oguzhan Gungor 7 years ago
parent 8016f83475
commit e92a664ab6
  1. 19
      Trust/Redeem/Rest/EventsRest.swift

@ -18,17 +18,18 @@ public class EventsRest {
completion(.failure(AnyError(response.error!)))
return
}
guard let jsonData = response.data else {
completion(.failure(AnyError(RestError.invalidResponse("JSON is invalid"))))
return
}
// TODO: Fix this
// guard let jsonData = response.data else {
// completion(.failure(AnyError(RestError.invalidResponse("JSON is invalid"))))
// return
// }
if 200...299 ~= statusCode { // success
guard let events: [Event] = Event.from(data: jsonData) else {
completion(.failure(AnyError(RestError.invalidResponse("Could not parse data"))))
return
}
completion(.success(events))
// guard let events: [Event] = Event.from(data: jsonData) else {
// completion(.failure(AnyError(RestError.invalidResponse("Could not parse data"))))
// return
// }
completion(.success([]))
} else {
completion(.failure(AnyError(RestError.invalidResponse("Could not parse data"))))
}

Loading…
Cancel
Save