mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Refresh token done
This commit is contained in:
@@ -34,6 +34,7 @@ export class EditGroupPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.chatService.refreshtoken();
|
||||
this.getRoomInfo();
|
||||
}
|
||||
|
||||
@@ -42,12 +43,6 @@ export class EditGroupPage implements OnInit {
|
||||
this.room = room['room'];
|
||||
|
||||
this.groupName = this.room.name.split('-').join(' ');
|
||||
},(error: HttpErrorResponse) => {
|
||||
if(error.status === 401){
|
||||
this.chatService.refreshtoken()
|
||||
this.getRoomInfo();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ export class GroupContactsPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.chatService.refreshtoken();
|
||||
//this.getRoomInfo();
|
||||
this.loadUsers();
|
||||
|
||||
@@ -203,12 +204,6 @@ export class GroupContactsPage implements OnInit {
|
||||
|
||||
|
||||
this.showLoader = false;
|
||||
},(error: HttpErrorResponse) => {
|
||||
if(error.status === 401){
|
||||
this.chatService.refreshtoken()
|
||||
this.loadUsers();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -160,6 +160,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.chatService.refreshtoken();
|
||||
console.log(this.roomId)
|
||||
this.loggedUser = this.loggedUserChat;
|
||||
//setTimeout(() => {
|
||||
@@ -367,12 +368,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
|
||||
this.allUsers = res['users'].filter(data => data.username != SessionStore.user.UserName);
|
||||
//
|
||||
},(error: HttpErrorResponse) => {
|
||||
if(error.status === 401){
|
||||
this.chatService.refreshtoken()
|
||||
this.getChatMembers();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,9 @@ export class ContactsPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.loadUsers();
|
||||
this.chatService.refreshtoken();
|
||||
}
|
||||
|
||||
onChange(event){
|
||||
@@ -83,12 +85,6 @@ export class ContactsPage implements OnInit {
|
||||
return 0;
|
||||
});
|
||||
this.showLoader = false;
|
||||
},(error: HttpErrorResponse) => {
|
||||
if(error.status === 401){
|
||||
this.chatService.refreshtoken()
|
||||
this.loadUsers();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -155,6 +155,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.chatService.refreshtoken();
|
||||
this.scrollToBottom();
|
||||
|
||||
this.getChatMembers();
|
||||
@@ -525,12 +526,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
this.members = res['members'];
|
||||
this.dmUsers = res['members'].filter(data => data.username != this.sessionStore.user.UserName)
|
||||
this.showLoader = false;
|
||||
},(error: HttpErrorResponse) => {
|
||||
if(error.status === 401){
|
||||
this.chatService.refreshtoken()
|
||||
this.getChatMembers();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user