From 9d78e7d654c51c22ce4be87efef5bc1f8d5a2d08 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 31 Oct 2019 16:16:48 +0300 Subject: Fix authentication --- Juick/Model/Message.m | 1 - Juick/Model/User.h | 1 + Juick/Model/User.m | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Juick/Model') diff --git a/Juick/Model/Message.m b/Juick/Model/Message.m index f5c2640..d39be54 100644 --- a/Juick/Model/Message.m +++ b/Juick/Model/Message.m @@ -7,7 +7,6 @@ // #import "Message.h" -#import "AppDelegate.h" @implementation Message diff --git a/Juick/Model/User.h b/Juick/Model/User.h index cbf4e46..344626e 100644 --- a/Juick/Model/User.h +++ b/Juick/Model/User.h @@ -12,6 +12,7 @@ @property (nonatomic, strong) NSString *uname; @property (nonatomic, strong) NSString *uid; @property (nonatomic, strong) NSString *avatar; +@property (nonatomic, strong) NSString *token; @property (nonatomic) NSInteger unreadCount; + (User *) fromJSON:(NSDictionary *)jsonData; diff --git a/Juick/Model/User.m b/Juick/Model/User.m index 94b77c4..a0c34f9 100644 --- a/Juick/Model/User.m +++ b/Juick/Model/User.m @@ -7,7 +7,6 @@ // #import "User.h" -#import "APIClient.h" @implementation User @@ -16,6 +15,7 @@ user.uid = jsonData[@"uid"]; user.uname = jsonData[@"uname"]; user.avatar = jsonData[@"avatar"]; + user.token = jsonData[@"hash"]; user.unreadCount = [jsonData[@"messagesCount"] integerValue]; return user; } -- cgit v1.2.3