Skip to content

Commit d4ff348

Browse files
committed
fix: #87 get tenant_id from AzureServices
1 parent 925becb commit d4ff348

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/app/modules/customer-management/services/customer.service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
22
import { HttpClient, HttpHeaders } from '@angular/common/http';
33

44
import { environment } from './../../../../environments/environment';
5+
import { AzureAdB2CService } from 'src/app/modules/login/services/azure.ad.b2c.service';
56
import { Observable } from 'rxjs';
67

78
@Injectable({
@@ -10,13 +11,14 @@ import { Observable } from 'rxjs';
1011
export class CustomerService {
1112
baseUrl = `${environment.timeTrackerApiUrl}/customers`;
1213

13-
constructor(private http: HttpClient) {}
14+
constructor(private http: HttpClient, private service: AzureAdB2CService) {}
1415

1516
createCustomer(customerData): Observable<any> {
1617
const body = {
1718
...customerData,
18-
tenant_id: sessionStorage.getItem('tenant_id'),
19+
tenant_id: this.service.getTenantId(),
1920
};
21+
console.log(this.service.getTenantId());
2022
return this.http.post(this.baseUrl, body);
2123
}
2224
}

0 commit comments

Comments
 (0)