mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Bug session expired resolved
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
@@ -41,6 +42,12 @@ export class MessagesOptionsPage implements OnInit {
|
||||
let body = { "roomId": this.roomId }
|
||||
this.chatService.removeChatRoom(body).subscribe(res=>{
|
||||
|
||||
},(error: HttpErrorResponse) => {
|
||||
if(error.status === 401){
|
||||
this.chatService.refreshtoken()
|
||||
this.closeChatRoom();
|
||||
}
|
||||
|
||||
});
|
||||
this.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user