summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-03-21 13:55:21 +0300
committerGravatar Vitaly Takmazov2019-03-21 14:09:26 +0300
commit7d16bf22b2ae69a7a6512587b28414a59aa95995 (patch)
treef73a738757acdbec36f123c4162127d6b1eb4330 /Juick/ViewControllers
parent2ddd7f7964d09236b43485c795970038dd1c309f (diff)
Move isAuthenticated to APIClient
Diffstat (limited to 'Juick/ViewControllers')
-rw-r--r--Juick/ViewControllers/DiscoverViewController.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m
index ea720be..94e1d16 100644
--- a/Juick/ViewControllers/DiscoverViewController.m
+++ b/Juick/ViewControllers/DiscoverViewController.m
@@ -23,7 +23,7 @@
-(void) viewDidLoad {
self.messagesDelegate = self;
- if ([User isAuthenticated]) {
+ if ([[APIClient sharedClient] isAuthenticated]) {
[[APIClient sharedClient] authenticate:^(User *user, NSError *error) {
if (user) {
if ([self.path length] == 0) {
@@ -99,7 +99,7 @@
}
}
- (IBAction)filterAction:(id)sender {
- if (![User isAuthenticated]) {
+ if (![[APIClient sharedClient] isAuthenticated]) {
[self.navigationController performSegueWithIdentifier:@"loginSegue" sender:self.navigationController];
return;
}