Bug on login when chat is down

This commit is contained in:
Eudes Inácio
2022-06-10 13:44:48 +01:00
parent 4275d71a43
commit 5534ea728f
+14 -10
View File
@@ -340,18 +340,22 @@ export class ChatService {
}
setheader() {
if (this.p.userPermission(this.p.permissionList.Chat.access)) {
this.loggedUserChat = this.authService.ValidatedUserChat;
this.headers = new HttpHeaders();
try {
if (this.p.userPermission(this.p.permissionList.Chat.access)) {
//
this.headers = this.headers.set('X-User-Id', SessionStore.user.ChatData.data.userId);
this.headers = this.headers.set('X-Auth-Token', SessionStore.user.ChatData.data.authToken);
this.options = {
headers: this.headers,
};
this.loggedUserChat = this.authService.ValidatedUserChat;
this.headers = new HttpHeaders();
if (this.p.userPermission(this.p.permissionList.Chat.access)) {
//
this.headers = this.headers.set('X-User-Id', SessionStore.user.ChatData.data.userId);
this.headers = this.headers.set('X-Auth-Token', SessionStore.user.ChatData.data.authToken);
this.options = {
headers: this.headers,
};
}
}
} catch (error) {
console.log(error)
}
}