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
@@ -10,6 +10,7 @@ import { FileLoaderService } from 'src/app/services/file/file-loader.service';
import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service';
import { environment } from 'src/environments/environment';
import { ThemeService } from 'src/app/services/theme.service'
import { HttpErrorResponse } from '@angular/common/http';
@Component({
selector: 'app-chat-options-features',
@@ -117,8 +118,12 @@ export class ChatOptionsFeaturesPage implements OnInit {
this.chatService.sendMessage(body).subscribe(res=> {
//
},(error) => {
},(error: HttpErrorResponse) => {
if(error.status === 401){
this.chatService.refreshtoken()
this.chatService.sendMessage(body);
}
});
//
};
@@ -144,8 +149,12 @@ export class ChatOptionsFeaturesPage implements OnInit {
this.chatService.sendMessage(body).subscribe(res=> {
},(error) => {
},(error: HttpErrorResponse) => {
if(error.status === 401){
this.chatService.refreshtoken()
this.chatService.sendMessage(body);
}
});
}