mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Bug session expired resolved
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { ModalController, PickerController } from '@ionic/angular';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -41,6 +42,12 @@ 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();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import * as _ from 'lodash';
|
||||
@@ -203,6 +203,12 @@ export class GroupContactsPage implements OnInit {
|
||||
|
||||
|
||||
this.showLoader = false;
|
||||
},(error: HttpErrorResponse) => {
|
||||
if(error.status === 401){
|
||||
this.chatService.refreshtoken()
|
||||
this.loadUsers();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import { AlertController } from '@ionic/angular';
|
||||
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';
|
||||
|
||||
|
||||
/*
|
||||
@@ -366,6 +367,12 @@ 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();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HttpHeaders } from '@angular/common/http';
|
||||
import { HttpErrorResponse, HttpHeaders } from '@angular/common/http';
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -83,6 +83,12 @@ export class ContactsPage implements OnInit {
|
||||
return 0;
|
||||
});
|
||||
this.showLoader = false;
|
||||
},(error: HttpErrorResponse) => {
|
||||
if(error.status === 401){
|
||||
this.chatService.refreshtoken()
|
||||
this.loadUsers();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import { AlertController, Platform } from '@ionic/angular';
|
||||
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';
|
||||
|
||||
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
@@ -524,6 +525,12 @@ 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