Ignore:
Timestamp:
10/18/21 00:19:16 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
188ee53
Parents:
fa375fe
Message:

editing location-form on frontend and backend

File:
1 edited

Legend:

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

    rfa375fe reed0bf8  
    3434    }
    3535
    36     @PostMapping(value = "/trip/locations")
    37     public List<Location> allLocationsAfterSubmittedForm(@RequestParam(required = false) String locName,
    38                                                          @RequestParam(required = false)  String companion,
    39                                                          @RequestParam(required = false) String region,
    40                                                          @RequestParam(required = false) List<String> categories,
    41                                                          @RequestParam(required = false)  int numberOfDays)  {
    42         List<Location> generatedLocations = this.locationService.scheduleLocations(locName, companion, region, categories, numberOfDays);
     36    @GetMapping(value = "/trip/locations")
     37    public List<Location> allLocationsAfterSubmittedForm(@RequestParam(required = false) Long locationId,
     38                                                         @RequestParam(required = false)  Long companionId,
     39                                                         @RequestParam(required = false) Long lengthOfStay,
     40                                                         @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);
    4343        if(locName.equals("Macedonia")){
    4444            return generatedLocations;
    4545        }else{
    4646            return generatedLocations;
    47         }
     47        }*/
    4848    }
    4949}
Note: See TracChangeset for help on using the changeset viewer.