Changeset 5d02859 for Farmatiko/ClientApp/src/app/shared
- Timestamp:
- 09/30/20 10:37:22 (4 years ago)
- Branches:
- master
- Children:
- 1454207
- Parents:
- 63d885e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/ClientApp/src/app/shared/data.service.ts
r63d885e r5d02859 11 11 baseFacilitiesUrl: string = '/api/facilities'; 12 12 baseWorkersUrl: string = '/api/workers'; 13 baseMedicineUrl: string = '/api/medicine ';13 baseMedicineUrl: string = '/api/medicines'; 14 14 basePandemicUrl: string = '/api/pandemic'; 15 15 basePharmacyUrl: string = '/api/pharmacy'; 16 16 basePharmacyHead: string = '/api/pharmacyhead'; 17 17 18 constructor(private http: HttpClient) { 18 constructor(private http: HttpClient) { 19 19 20 20 } … … 44 44 } 45 45 46 46 47 47 //Worker GET 48 48 getWorkers() : Observable<IHealthcareWorkers[]> { … … 69 69 } 70 70 71 71 72 72 //Medicine GET 73 73 getMedicines() : Observable<IMedicine[]> { … … 95 95 96 96 97 getPandemic() : Observable<IPandemic > {98 return this.http.get<IPandemic >(this.basePandemicUrl)97 getPandemic() : Observable<IPandemic[]> { 98 return this.http.get<IPandemic[]>(this.basePandemicUrl) 99 99 .pipe(catchError(this.handleError)); 100 100 } … … 179 179 //PharmacyHead PUT 180 180 updatePharmacyHead(head: IPharmacyHead) : Observable<IPharmacyHead> { 181 return this.http.put<IPharmacyHead>(this.basePharmacyHead + '/' + head.id, head) 181 return this.http.put<IPharmacyHead>(this.basePharmacyHead + '/' + head.id, head) 182 182 .pipe( 183 183 map((data) => { … … 198 198 199 199 private handleError(error: HttpErrorResponse) { 200 console.error('server error:', error); 200 console.error('server error:', error); 201 201 if (error.error instanceof Error) { 202 202 let errMessage = error.error.message;
Note:
See TracChangeset
for help on using the changeset viewer.