summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers/LoginViewController.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-03-21 13:48:40 +0300
committerGravatar Vitaly Takmazov2019-03-21 14:08:59 +0300
commit2ddd7f7964d09236b43485c795970038dd1c309f (patch)
tree74f3aa2d9022542bad2e1450ab374e38a2312f77 /Juick/ViewControllers/LoginViewController.m
parent6cab755f3a9308991d52b1870bad28af5edb297c (diff)
New login API
Diffstat (limited to 'Juick/ViewControllers/LoginViewController.m')
-rw-r--r--Juick/ViewControllers/LoginViewController.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/Juick/ViewControllers/LoginViewController.m b/Juick/ViewControllers/LoginViewController.m
index f8cbcc8..de18286 100644
--- a/Juick/ViewControllers/LoginViewController.m
+++ b/Juick/ViewControllers/LoginViewController.m
@@ -56,8 +56,8 @@
}
- (void) doneSignIn {
- [[APIClient sharedClient] authenticate:^(BOOL success) {
- if (success) {
+ [[APIClient sharedClient] authenticate:^(User *user, NSError *error) {
+ if (user) {
[[AppDelegate shared] registerForRemoteNotifications];
CATransition* transition = [CATransition animation];
transition.duration = 0.3;
@@ -67,7 +67,7 @@
[self.navigationController.view.layer addAnimation:transition forKey:kCATransition];
[self.navigationController dismissViewControllerAnimated:NO completion:nil];
} else {
- [User throwUnableToLogin:self];
+ [User throwUnableToLogin:self error:error];
}
}];
}