This commit is contained in:
Peter Maquiran
2023-01-24 15:56:47 +01:00
parent 0748612054
commit fbd50137f3
153 changed files with 5997 additions and 953 deletions
+13 -1
View File
@@ -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);