Changeset 1db5673 for Farmatiko/ClientApp/src/app/shared
- Timestamp:
- 11/14/20 12:27:30 (4 years ago)
- Branches:
- master
- Children:
- 68454c6
- Parents:
- ad60966
- Location:
- Farmatiko/ClientApp/src/app/shared
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Farmatiko/ClientApp/src/app/shared/data.service.ts
rad60966 r1db5673 6 6 7 7 import { IHealthFacilities, IHealthcareWorkers, IMedicine, IPandemic, IPharmacy, IPharmacyHead, IPharmacyHeadRequest } from './interfaces'; 8 import { environment } from '../../environments/environment'; 8 9 9 10 @Injectable() 10 11 export 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`; 17 18 18 19 constructor(private http: HttpClient) { … … 179 180 //PharmacyHead PUT 180 181 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) 182 183 .pipe( 183 184 map((data) => { -
Farmatiko/ClientApp/src/app/shared/interfaces.ts
rad60966 r1db5673 57 57 originalUserName?: string; 58 58 Role?: string; 59 } 60 59 } 61 60 export interface IPharmacyHeadRequest { 62 61 id?: string; -
Farmatiko/ClientApp/src/app/shared/services/auth.service.ts
rad60966 r1db5673 9 9 10 10 interface LoginResult { 11 user name: string;11 userName: string; 12 12 role: string; 13 13 originalUserName?: string; … … 36 36 this.http.get<LoginResult>(`${this.apiUrl}/user`).subscribe((x) => { 37 37 this._user.next({ 38 Email: x.user name,38 Email: x.userName, 39 39 Passwd: x.head.Passwd, 40 40 Role: x.role, … … 64 64 map((x) => { 65 65 this._user.next({ 66 Email: x.user name,66 Email: x.userName, 67 67 Passwd: x.head.Passwd, 68 68 Role: x.role, … … 105 105 map((x) => { 106 106 this._user.next({ 107 Email: x.user name,107 Email: x.userName, 108 108 Passwd: x.head.Passwd, 109 109 Role: x.role,
Note:
See TracChangeset
for help on using the changeset viewer.