mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
fix
This commit is contained in:
@@ -24,22 +24,16 @@ export class AttachmentsService {
|
||||
private changeProfileService: ChangeProfileService) {
|
||||
|
||||
this.changeProfileService.registerCallback(() => {
|
||||
this.loggeduser = SessionStore.user
|
||||
this.headers = new HttpHeaders();
|
||||
|
||||
this.headers = this.headers.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
})
|
||||
this.changeProfileService.registerLoginCallback(() => {
|
||||
this.loggeduser = SessionStore.user
|
||||
this.headers = new HttpHeaders();
|
||||
|
||||
this.headers = this.headers.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
})
|
||||
this.setHeader()
|
||||
});
|
||||
this.setHeader()
|
||||
|
||||
}
|
||||
|
||||
setHeader() {
|
||||
this.loggeduser = SessionStore.user
|
||||
this.headers = new HttpHeaders();
|
||||
this.headers = this.headers.set('Authorization', SessionStore.user.BasicAuthKey);
|
||||
|
||||
}
|
||||
|
||||
uploadFile(formData:any) {
|
||||
|
||||
@@ -25,7 +25,7 @@ import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
|
||||
export class AuthService {
|
||||
userData$ = new BehaviorSubject<any>('');
|
||||
userId$ = new BehaviorSubject<any>('');
|
||||
headers: HttpHeaders;
|
||||
headers: HttpHeaders = new HttpHeaders();
|
||||
public wsValidatedUserChat:any;
|
||||
public isWsAuthenticated: boolean = false;
|
||||
opts:any;
|
||||
@@ -43,9 +43,7 @@ export class AuthService {
|
||||
private storage: Storage,
|
||||
private initialsService: InitialsService,
|
||||
public p: PermissionService,
|
||||
public ChatSystemService: ChatSystemService, ) {
|
||||
|
||||
this.headers = new HttpHeaders();
|
||||
public ChatSystemService: ChatSystemService) {
|
||||
|
||||
if (SessionStore.exist) {
|
||||
if(this.p.userPermission(this.p.permissionList.Chat.access) == true ) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import { environment } from 'src/environments/environment';
|
||||
import { AuthService } from '../services/auth.service';
|
||||
import { LoginUserRespose } from '../models/user.model';
|
||||
import { SessionStore } from '../store/session.service';
|
||||
import { ChangeProfileService } from './change-profile.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -16,7 +17,18 @@ export class ContactsService {
|
||||
loggeduser: LoginUserRespose;
|
||||
headers: HttpHeaders;
|
||||
|
||||
constructor(private http: HttpClient, user: AuthService) {
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
user: AuthService,
|
||||
private changeProfileService: ChangeProfileService) {
|
||||
|
||||
this.setHeader()
|
||||
this.changeProfileService.registerCallback(() => {
|
||||
this.setHeader()
|
||||
})
|
||||
}
|
||||
|
||||
setHeader() {
|
||||
this.loggeduser = SessionStore.user;
|
||||
this.headers = new HttpHeaders();
|
||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
|
||||
@@ -583,8 +583,6 @@ export class EventsService {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
getAllSharedOficialEvents(startdate: string, enddate: string): Observable<Event[]> {
|
||||
let geturl = environment.apiURL + 'calendar/pr';
|
||||
geturl = geturl.replace('/V4/', '/V5/')
|
||||
|
||||
@@ -7,6 +7,7 @@ import { AuthService } from '../services/auth.service';
|
||||
import { LoginUserRespose } from '../models/user.model';
|
||||
import { OrganicEntity } from 'src/app/models/organic-entity.model';
|
||||
import { SessionStore } from '../store/session.service';
|
||||
import { ChangeProfileService } from './change-profile.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -17,7 +18,18 @@ export class OrganicEntityService {
|
||||
loggeduser: LoginUserRespose;
|
||||
headers: HttpHeaders;
|
||||
|
||||
constructor(private http: HttpClient, user: AuthService) {
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
user: AuthService,
|
||||
private changeProfileService: ChangeProfileService) {
|
||||
|
||||
this.setHeader()
|
||||
this.changeProfileService.registerCallback(() => {
|
||||
this.setHeader()
|
||||
})
|
||||
}
|
||||
|
||||
setHeader() {
|
||||
this.loggeduser = SessionStore.user;
|
||||
this.headers = new HttpHeaders();
|
||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
|
||||
@@ -9,6 +9,7 @@ import { Publication } from '../models/publication';
|
||||
import { getUrl } from 'ionicons/dist/types/components/icon/utils';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { SessionStore } from '../store/session.service';
|
||||
import { ChangeProfileService } from './change-profile.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -23,11 +24,20 @@ export class PublicationsService {
|
||||
|
||||
constructor(private http: HttpClient, user: AuthService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router) {
|
||||
private router: Router,
|
||||
private changeProfileService: ChangeProfileService,) {
|
||||
|
||||
this.setHeader()
|
||||
this.changeProfileService.registerCallback(() => {
|
||||
this.setHeader()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
setHeader () {
|
||||
this.loggeduser = SessionStore.user;
|
||||
this.headers = new HttpHeaders();
|
||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
|
||||
}
|
||||
|
||||
GetPublicationFolderList(){
|
||||
|
||||
@@ -8,6 +8,7 @@ import { LoginUserRespose } from '../models/user.model';
|
||||
import { EventSearch } from "src/app/models/event-search";
|
||||
import { TopSearch } from 'src/app/models/top-search';
|
||||
import { SessionStore } from '../store/session.service';
|
||||
import { ChangeProfileService } from './change-profile.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -21,7 +22,20 @@ export class SearchService {
|
||||
categories= Array;
|
||||
|
||||
// setup
|
||||
constructor(private http: HttpClient, user: AuthService) {
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
user: AuthService,
|
||||
private changeProfileService: ChangeProfileService) {
|
||||
|
||||
this.setHeader();
|
||||
|
||||
this.changeProfileService.registerCallback(() => {
|
||||
this.setHeader()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
setHeader() {
|
||||
this.loggeduser = SessionStore.user;
|
||||
this.headers = new HttpHeaders();
|
||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
|
||||
Reference in New Issue
Block a user