From e92a664ab6c712b82c3c14090d10a2d3bdc47dba Mon Sep 17 00:00:00 2001 From: Oguzhan Gungor Date: Wed, 14 Mar 2018 13:12:38 +1000 Subject: [PATCH] Commenting out the code to parse events --- Trust/Redeem/Rest/EventsRest.swift | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Trust/Redeem/Rest/EventsRest.swift b/Trust/Redeem/Rest/EventsRest.swift index fd44cfc2e..5f5384485 100644 --- a/Trust/Redeem/Rest/EventsRest.swift +++ b/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")))) }