Skip to content
Prev Previous commit
Next Next commit
fix: #87 get tenant_id from session storage
  • Loading branch information
daros10 committed Apr 17, 2020
commit 925becb9082bdcb64f6760abc64cd256f9d2668c
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import { Observable } from 'rxjs';
providedIn: 'root',
})
export class CustomerService {
baseUrl = `https://private-8c3d21-ts32.apiary-mock.com/customers`;
baseUrl = `${environment.timeTrackerApiUrl}/customers`;

constructor(private http: HttpClient) {}

createCustomer(customerData): Observable<any> {
const body = {
...customerData,
tenant_id: '4225ab1e-1033-4a5f-8650-0dd4950f38c8',
tenant_id: sessionStorage.getItem('tenant_id'),
};
return this.http.post(this.baseUrl, body);
}
Expand Down