Changeset 59329aa for trip-planner-front/src/app/_services
- Timestamp:
- 11/23/21 14:58:44 (3 years ago)
- Branches:
- master
- Children:
- e29cc2e
- Parents:
- ceaed42
- Location:
- trip-planner-front/src/app/_services
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/src/app/_services/location.service.ts
rceaed42 r59329aa 26 26 } 27 27 28 getLocationsF roPlanner(plannerId : number) : Observable<Location[]>{28 getLocationsForPlanner(plannerId : number) : Observable<Location[]>{ 29 29 let url = "http://localhost:8080/api/planner/locations"; 30 30 return this.httpClient.get<Location[]>(url + '?plannerId=' + plannerId); 31 31 } 32 33 getAllLocations() : Observable<Location[]> { 34 let url = "http://localhost:8080/api/locations"; 35 return this.httpClient.get<Location[]>(url); 36 } 37 38 getWeekendGetaways() : Observable<Location[]>{ 39 let url = "http://localhost:8080/api/weekend"; 40 return this.httpClient.get<Location[]>(url); 41 } 42 43 getVillages() : Observable<Location[]>{ 44 let url = "http://localhost:8080/api/villages"; 45 return this.httpClient.get<Location[]>(url); 46 } 47 48 getLocation(id : number) :Observable<Location>{ 49 let url = "http://localhost:8080/api/location/" + id; 50 return this.httpClient.get<Location>(url); 51 } 52 53 getAllLocationsForPlanner(id: number): Observable<Location[]>{ 54 let url = "http://localhost:8080/api/planner/locations"; 55 return this.httpClient.get<Location[]>(url + "?plannerId=" + id); 56 } 57 32 58 } -
trip-planner-front/src/app/_services/planner.service.ts
rceaed42 r59329aa 1 import { HttpClient , HttpHeaders} from "@angular/common/http";1 import { HttpClient } from "@angular/common/http"; 2 2 import { Injectable } from "@angular/core"; 3 3 import { Observable } from "rxjs";
Note:
See TracChangeset
for help on using the changeset viewer.