diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts index 2b3096e06..78a481246 100644 --- a/src/app/services/chat.service.ts +++ b/src/app/services/chat.service.ts @@ -13,7 +13,7 @@ import { Observable, Subject } from "rxjs/Rx"; providedIn: 'root' }) export class ChatService { - _headers: HttpHeaders; + headers: HttpHeaders; options:any; options1:any; X_User_Id:any; @@ -27,26 +27,19 @@ export class ChatService { constructor( private http:HttpClient, private httpService: HttpService, - public authService: AuthService, + private authService: AuthService, private storage: Storage, private storageService:StorageService, ) - {} - - get headers() { - this.loggedUserChat = this.authService.ValidatedUserChat; - this._headers = new HttpHeaders(); - 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.loggedUserChat = authService.ValidatedUserChat; + this.headers = new HttpHeaders(); + 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.options = { - headers: this._headers, + headers: this.headers, }; - return this._headers - } - - setHeader = () => { - } getDocumentDetails(url:string){