Removed json data fix and pop to root view after logout

This commit is contained in:
Raimund Wege
2017-09-07 16:39:27 +02:00
parent a74457df8e
commit d0250fb7ad
2 changed files with 3 additions and 1 deletions
@@ -81,6 +81,7 @@ extension StartViewController: SignUpControllerDelegate {
func signUpControllerDidLogout(_ controller: SignUpController) {
userName = nil
navigationController?.popToRootViewController(animated: true)
}
}
@@ -66,9 +66,10 @@ class TrainingRequestManager: NSObject {
fileprivate func postCreateEventSuccess(responseObject: Any?, success: (_ createEventData: CreateEventData) -> Void, failure: (_ error: Error, _ message: String?) -> Void) {
if let data = responseObject as? Data {
do {
let jsonObject = try JSONSerialization.jsonObject(with: fixJSON(data: data))
let jsonObject = try JSONSerialization.jsonObject(with: data)
success(CreateEventData(dictionary: jsonObject as? [String: AnyObject]))
} catch {
logError(name: "\(#function)", error: error)
postCreateEventFailure(error: TrainingRequestManagerError.invalidResponse, failure: failure)
}
} else {