- Timestamp:
- 11/02/21 22:14:57 (3 years ago)
- Branches:
- master
- Children:
- 6c1585f
- Parents:
- 188ee53
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/src/app/_services/planner.service.ts
r188ee53 r6a80231 1 import { HttpClient } from "@angular/common/http";1 import { HttpClient, HttpHeaders } from "@angular/common/http"; 2 2 import { Injectable } from "@angular/core"; 3 3 import { Observable } from "rxjs"; 4 import { PlannerDto } from "../_models/dto/plannerDto"; 4 5 import { Planner } from "../_models/planner"; 5 6 … … 14 15 return this.httpClient.get<Planner[]>(url); 15 16 } 17 18 postInitialPlanner(plannerDto: PlannerDto): Observable<Object>{ 19 let url = "http://localhost:8080/api/planner/new"; 20 return this.httpClient.post<Planner>(url, plannerDto); 21 } 22 23 updatePlanner(id: number):Observable<Planner>{ 24 let url = "http://localhost:8080/api/edit/planner/" + id; 25 return this.httpClient.put<Planner>(url, null); 26 } 16 27 }
Note:
See TracChangeset
for help on using the changeset viewer.