Ignore:
Timestamp:
11/14/20 12:27:30 (2 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
68454c6
Parents:
ad60966
Message:

Fix bugs, add some more

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/ClientApp/src/app/shared/data.service.ts

    rad60966 r1db5673  
    66
    77import { IHealthFacilities, IHealthcareWorkers, IMedicine, IPandemic, IPharmacy, IPharmacyHead, IPharmacyHeadRequest } from './interfaces';
     8import { environment } from '../../environments/environment';
    89
    910@Injectable()
    1011export class DataService {
    11     baseFacilitiesUrl: string = '/api/facilities';
    12     baseWorkersUrl: string = '/api/workers';
    13     baseMedicineUrl: string = '/api/medicines';
    14     basePandemicUrl: string = '/api/pandemic';
    15     basePharmacyUrl: string = '/api/pharmacy';
    16     basePharmacyHead: string = '/api/pharmacyhead';
     12    baseFacilitiesUrl: string = `${environment.baseApiUrl}api/facilities`;
     13    baseWorkersUrl: string = `${environment.baseApiUrl}api/workers`;
     14    baseMedicineUrl: string = `${environment.baseApiUrl}api/medicines`;
     15    basePandemicUrl: string = `${environment.baseApiUrl}api/pandemic`;
     16    basePharmacyUrl: string = `${environment.baseApiUrl}api/pharmacy`;
     17    basePharmacyHead: string = `${environment.baseApiUrl}api/pharmacyhead`;
    1718
    1819    constructor(private http: HttpClient) {
     
    179180    //PharmacyHead PUT
    180181    updatePharmacyHead(head: IPharmacyHead) : Observable<IPharmacyHead> {
    181         return this.http.put<IPharmacyHead>(this.basePharmacyHead + '/' + head.id, head)
     182        return this.http.put<IPharmacyHead>(this.basePharmacyHead, head)
    182183                   .pipe(
    183184                        map((data) => {
Note: See TracChangeset for help on using the changeset viewer.