Ignore:
Timestamp:
11/11/21 12:59:26 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
59329aa
Parents:
6c1585f
Message:

add location to planner

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/LocationRestController.java

    r6c1585f rceaed42  
    22
    33import finki.diplomska.tripplanner.models.Location;
     4import finki.diplomska.tripplanner.models.dto.PlannerLocationDto;
    45import finki.diplomska.tripplanner.service.LocationService;
    56import finki.diplomska.tripplanner.service.PlannerService;
     
    5051        return this.locationService.findLocationsFromRegionForm(regionId, companionId,lengthOfStay, categoryIds);
    5152    }
     53
     54    @PutMapping(value = "/add-location")
     55    public Location addLocationToPlanner(@RequestBody PlannerLocationDto plannerLocationDto){
     56        return this.locationService.addLocationToPlanner(plannerLocationDto);
     57    }
     58
     59    @GetMapping(value = "/planner/locations")
     60    public List<Location> getAllLocationsForPlanner (@RequestParam Long plannerId){
     61        return this.locationService.getAllLocationsForPlanner(plannerId);
     62    }
    5263}
Note: See TracChangeset for help on using the changeset viewer.