fixed SelfService

master
Max 5 years ago
parent 6fb77fdc62
commit 7bc3a1f21e

@ -45,16 +45,16 @@ export class SelfService {
public updateUserInfo(response : any){ public updateUserInfo(response : any){
const user: User = new User(); const user: User = new User();
user.loggedIn = true; user.loggedIn = true;
user.userID = response.data.login.id; user.userID = response.data.getSelf.id;
user.username = response.data.login.name; user.username = response.data.getSelf.name;
user.handle = response.data.login.handle; user.handle = response.data.getSelf.handle;
user.email = response.data.login.email; user.email = response.data.getSelf.email;
user.points = response.data.login.points; user.points = response.data.getSelf.points;
user.level = response.data.login.level; user.level = response.data.getSelf.level;
user.friendIDs = response.data.login.friends; user.friendIDs = response.data.getSelf.friends;
user.groupIDs = response.data.login.groups; user.groupIDs = response.data.getSelf.groups;
user.chatIDs = response.data.login.chats; user.chatIDs = response.data.getSelf.chats;
user.requestIDs = response.data.login.requests; user.requestIDs = response.data.getSelf.requests;
this.data.changeUserInfo(user) this.data.changeUserInfo(user)
} }

Loading…
Cancel
Save