diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts index 77df7e1a3..4e733933e 100644 --- a/src/app/services/auth.service.ts +++ b/src/app/services/auth.service.ts @@ -62,7 +62,6 @@ export class AuthService { if(SessionStore?.user?.ChatData) { this.ValidatedUserChat = SessionStore.user.ChatData - console.log('!!!!::!!!!', SessionStore.user) } diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts index 7058b8cf9..cc51df1e1 100644 --- a/src/app/services/chat.service.ts +++ b/src/app/services/chat.service.ts @@ -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, };