Ignore:
Timestamp:
10/19/21 16:40:43 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
6a80231
Parents:
eed0bf8
Message:

location-form

File:
1 edited

Legend:

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

    reed0bf8 r188ee53  
    3434    }
    3535
    36     @GetMapping(value = "/trip/locations")
    37     public List<Location> allLocationsAfterSubmittedForm(@RequestParam(required = false) Long locationId,
     36    @GetMapping(value = "/city/locations")
     37    public List<Location> getAllLocationsFromCity(@RequestParam(required = false) Long cityId,
    3838                                                         @RequestParam(required = false)  Long companionId,
    3939                                                         @RequestParam(required = false) Long lengthOfStay,
    4040                                                         @RequestParam(required = false) String categoryIds)  {
    41         return this.locationService.findLocations(locationId, companionId, lengthOfStay, categoryIds);
    42         /* List<Location> generatedLocations = this.locationService.scheduleLocations(locName, companion, region, categories, numberOfDays);
    43         if(locName.equals("Macedonia")){
    44             return generatedLocations;
    45         }else{
    46             return generatedLocations;
    47         }*/
     41        return this.locationService.findLocationsFromCityForm(cityId, companionId, lengthOfStay, categoryIds);
     42
     43    }
     44
     45    @GetMapping(value = "/region/locations")
     46    public List<Location> getAllLocationsFromRegion(@RequestParam(required = false) Long regionId,
     47                                                    @RequestParam(required = false)  Long companionId,
     48                                                    @RequestParam(required = false) Long lengthOfStay,
     49                                                    @RequestParam(required = false) String categoryIds){
     50        return this.locationService.findLocationsFromRegionForm(regionId, companionId,lengthOfStay, categoryIds);
    4851    }
    4952}
Note: See TracChangeset for help on using the changeset viewer.