Ignore:
Timestamp:
09/30/20 10:37:22 (4 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
1454207
Parents:
63d885e
Message:

Add new repo, service and controller

File:
1 edited

Legend:

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

    r63d885e r5d02859  
    1111    baseFacilitiesUrl: string = '/api/facilities';
    1212    baseWorkersUrl: string = '/api/workers';
    13     baseMedicineUrl: string = '/api/medicine';
     13    baseMedicineUrl: string = '/api/medicines';
    1414    basePandemicUrl: string = '/api/pandemic';
    1515    basePharmacyUrl: string = '/api/pharmacy';
    1616    basePharmacyHead: string = '/api/pharmacyhead';
    1717
    18     constructor(private http: HttpClient) { 
     18    constructor(private http: HttpClient) {
    1919
    2020    }
     
    4444    }
    4545
    46    
     46
    4747    //Worker GET
    4848    getWorkers() : Observable<IHealthcareWorkers[]> {
     
    6969    }
    7070
    71    
     71
    7272    //Medicine GET
    7373    getMedicines() : Observable<IMedicine[]> {
     
    9595
    9696
    97     getPandemic() : Observable<IPandemic> {
    98         return this.http.get<IPandemic>(this.basePandemicUrl)
     97    getPandemic() : Observable<IPandemic[]> {
     98        return this.http.get<IPandemic[]>(this.basePandemicUrl)
    9999                   .pipe(catchError(this.handleError));
    100100    }
     
    179179    //PharmacyHead PUT
    180180    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)
    182182                   .pipe(
    183183                        map((data) => {
     
    198198
    199199    private handleError(error: HttpErrorResponse) {
    200         console.error('server error:', error); 
     200        console.error('server error:', error);
    201201        if (error.error instanceof Error) {
    202202          let errMessage = error.error.message;
Note: See TracChangeset for help on using the changeset viewer.