Ignore:
Timestamp:
11/04/21 23:10:39 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
ceaed42
Parents:
6a80231
Message:

edit planner form with angular

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/src/app/_services/planner.service.ts

    r6a80231 r6c1585f  
    1616    }
    1717
    18     postInitialPlanner(plannerDto: PlannerDto): Observable<Object>{     
     18    postInitialPlanner(planner: Planner, locationList: Location[]): Observable<Object>{     
    1919        let url = "http://localhost:8080/api/planner/new";
    20         return this.httpClient.post<Planner>(url, plannerDto);
     20        return this.httpClient.post<Planner>(url, planner);
    2121    }
    2222
    23     updatePlanner(id: number):Observable<Planner>{   
     23    updatePlanner(id: number, plannerDto : PlannerDto):Observable<Planner>{   
    2424    let url = "http://localhost:8080/api/edit/planner/" + id;
    25     return this.httpClient.put<Planner>(url, null);
     25    return this.httpClient.put<Planner>(url, plannerDto);
     26    }
     27
     28    getPlannerById(id:number):Observable<Planner>{
     29        let url = "http://localhost:8080/api/planner/" + id;
     30        return this.httpClient.get<Planner>(url);
    2631    }
    2732}
Note: See TracChangeset for help on using the changeset viewer.