Bug session expired resolved

This commit is contained in:
Eudes Inácio
2022-06-08 11:56:56 +01:00
parent f1e8cedc35
commit 73d0696ea6
15 changed files with 121 additions and 9 deletions
@@ -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();
}