Changeset 993189e for Farmatiko/ClientApp/src/app/shared
- Timestamp:
- 10/30/20 02:04:06 (4 years ago)
- Branches:
- master
- Children:
- 1f4846d
- Parents:
- 6f203af
- Location:
- Farmatiko/ClientApp/src/app/shared
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/ClientApp/src/app/shared/data.service.ts
r6f203af r993189e 1 import { Injectable ,} from '@angular/core';1 import { Injectable } from '@angular/core'; 2 2 import { HttpClient, HttpErrorResponse } from '@angular/common/http'; 3 3 … … 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 } … … 143 143 catchError(this.handleError) 144 144 ); 145 }146 loginPharmacyHead(email: string, passwd: string) : Observable<any> {147 let postData = {email : email ,password :passwd};148 return this.http.post<any>(this.basePharmacyHead + '/login', postData)149 .pipe(150 map((data) => {151 return data;152 }),153 catchError(this.handleError)154 );155 }156 getPharmacyHead(id: string) : Observable<IPharmacyHead> {157 return this.http.get<IPharmacyHead>(this.basePharmacyHead + '/' + id)158 .pipe(catchError(this.handleError));159 145 } 160 146 //PharmacyHead POST -
Farmatiko/ClientApp/src/app/shared/interfaces.ts
r6f203af r993189e 29 29 30 30 export interface IPandemic { 31 id?: string; 31 32 name?: string; 32 33 totalMK?: number;
Note:
See TracChangeset
for help on using the changeset viewer.