This commit is contained in:
Peter Maquiran
2022-05-09 15:01:30 +01:00
parent 25fec510d9
commit 8e127b5146
2 changed files with 3 additions and 6 deletions
+3 -5
View File
@@ -7,7 +7,7 @@ import { HttpClient, HttpHeaderResponse } from '@angular/common/http';
import { environment } from 'src/environments/environment';
import { Storage } from '@ionic/storage';
import { PermissionService } from './permission.service';
import { SessionStore } from '../store/session.service';
@Injectable({
providedIn: 'root'
@@ -33,12 +33,10 @@ export class ChatService {
this.loggedUserChat = authService.ValidatedUserChat;
this.headers = new HttpHeaders();
console.log('!!!::!!! chat service',this.loggedUserChat)
if(this.p.userPermission(this.p.permissionList.Chat.access)) {
//
this.headers = this.headers.set('X-User-Id', this.loggedUserChat.data.userId);
this.headers = this.headers.set('X-Auth-Token', this.loggedUserChat.data.authToken);
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,
};