- Timestamp:
- 01/24/22 21:08:32 (3 years ago)
- Branches:
- master
- Children:
- 76712b2
- Parents:
- bdd6491
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/src/app/_services/planner.service.ts
rbdd6491 rb738035 3 3 import { Observable } from "rxjs"; 4 4 import { PlannerDto } from "../_models/dto/plannerDto"; 5 import { PlannerLocationDto } from "../_models/dto/plannerLocationDto"; 5 6 import { Planner } from "../_models/planner"; 6 7 … … 15 16 'Content-Type': 'application/json' 16 17 }); 17 18 18 19 19 constructor(private httpClient: HttpClient) { … … 30 30 postInitialPlanner(plannerDto: PlannerDto): Observable<Planner> { 31 31 let url = "http://localhost:8080/api/planner/new"; 32 return this.httpClient.post<Planner>(url, plannerDto );32 return this.httpClient.post<Planner>(url, plannerDto, {headers: this.httpHeaders}); 33 33 } 34 34 … … 47 47 return this.httpClient.delete<Planner>(url, { headers: this.httpHeaders }); 48 48 } 49 50 deleteLocationFromPlanner(plannerLocationDto : PlannerLocationDto) { 51 let url = "http://localhost:8080/api/delete-location"; 52 const options = { 53 body: { 54 "plannerId": plannerLocationDto.plannerId, 55 "locationId": plannerLocationDto.locationId 56 } 57 } 58 return this.httpClient.request('delete', url, options); 59 } 60 61 49 62 }
Note:
See TracChangeset
for help on using the changeset viewer.