mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Bug session expired resolved
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import * as _ from 'lodash';
|
||||
@@ -85,6 +85,12 @@ export class GroupContactsPage implements OnInit {
|
||||
|
||||
|
||||
this.showLoader = false;
|
||||
},(error: HttpErrorResponse) => {
|
||||
if(error.status === 401){
|
||||
this.chatService.refreshtoken()
|
||||
this.loadUsers();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import { MessageService } from 'src/app/services/chat/message.service';
|
||||
import { File } from '@awesome-cordova-plugins/file/ngx';
|
||||
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
|
||||
@Component({
|
||||
selector: 'app-group-messages',
|
||||
@@ -380,6 +381,12 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
this.allUsers = res['users'].filter(data => data.username != SessionStore.user.UserName);
|
||||
|
||||
},(error: HttpErrorResponse) => {
|
||||
if(error.status === 401){
|
||||
this.chatService.refreshtoken()
|
||||
this.getChatMembers();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user