mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-19 20:25:31 +00:00
Removed json data fix and pop to root view after logout
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user