mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix logout
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AuthService } from './auth.service';
|
||||
import { HttpService } from './http.service';
|
||||
import { StorageService } from './storage.service';
|
||||
import { HttpClient, HttpHeaderResponse } from '@angular/common/http';
|
||||
import { HttpClient } 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';
|
||||
|
||||
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@@ -24,19 +23,21 @@ export class ChatService {
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private httpService: HttpService,
|
||||
private authService: AuthService,
|
||||
private storage: Storage,
|
||||
private storageService: StorageService,
|
||||
public p: PermissionService) {
|
||||
public p: PermissionService,
|
||||
private changeProfileService: ChangeProfileService,) {
|
||||
|
||||
this.setheader()
|
||||
this.changeProfileService.registerCallback(() => {
|
||||
this.setheader();
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
getDocumentDetails(url: string) {
|
||||
let headersc = new HttpHeaders();
|
||||
headersc = headersc.set('X-User-Id', this.loggedUserChat['data'].userId);
|
||||
headersc = headersc.set('X-Auth-Token', this.loggedUserChat['data'].authToken);
|
||||
headersc = headersc.set('X-User-Id', SessionStore.user.ChatData.data.userId);
|
||||
headersc = headersc.set('X-Auth-Token', SessionStore.user.ChatData.data.authToken);
|
||||
headersc = headersc.set('Sec-Fetch-Dest', 'attachment');
|
||||
headersc = headersc.set('Sec-Fetch-Mode', 'navigate');
|
||||
headersc = headersc.set('Cookie', 'rc_uid=fsMwcNdufWvdnChj7');
|
||||
@@ -342,7 +343,6 @@ export class ChatService {
|
||||
setheader() {
|
||||
try {
|
||||
if (this.p.userPermission(this.p.permissionList.Chat.access)) {
|
||||
this.loggedUserChat = this.authService.ValidatedUserChat;
|
||||
this.headers = new HttpHeaders();
|
||||
|
||||
if (this.p.userPermission(this.p.permissionList.Chat.access)) {
|
||||
|
||||
Reference in New Issue
Block a user