Index: trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/ImagesRestController.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/ImagesRestController.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,23 +1,0 @@
-package finki.diplomska.tripplanner.web.rest;
-
-import finki.diplomska.tripplanner.models.Images;
-import finki.diplomska.tripplanner.service.ImagesService;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-@RestController
-@CrossOrigin(origins = "http://localhost:4200")
-@RequestMapping(value = "/api")
-public class ImagesRestController {
-    private final ImagesService imagesService;
-
-    public ImagesRestController(ImagesService imagesService) {
-        this.imagesService = imagesService;
-    }
-
-    @GetMapping(value = "/images")
-    public List<Images> getAllImagesForLocation(@RequestParam Long locationId){
-        return this.imagesService.getAllImagesForLocation(locationId);
-    }
-}
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/LocationRestController.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/LocationRestController.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/LocationRestController.java	(revision 6a3a178323fd905112b5392bd9d3cb83b66ef2d3)
@@ -2,11 +2,7 @@
 
 import finki.diplomska.tripplanner.models.Location;
-import finki.diplomska.tripplanner.models.User;
-import finki.diplomska.tripplanner.models.dto.LocationDto;
-import finki.diplomska.tripplanner.models.dto.PlannerLocationDto;
 import finki.diplomska.tripplanner.service.LocationService;
 import finki.diplomska.tripplanner.service.PlannerService;
 import org.springframework.http.ResponseEntity;
-import org.springframework.security.core.Authentication;
 import org.springframework.web.bind.annotation.*;
 
@@ -38,57 +34,16 @@
     }
 
-    @GetMapping(value = "/city/locations")
-    public List<Location> getAllLocationsFromCity(@RequestParam(required = false) Long cityId,
-                                                         @RequestParam(required = false)  Long companionId,
-                                                         @RequestParam(required = false) Long lengthOfStay,
-                                                         @RequestParam(required = false) String categoryIds)  {
-        return this.locationService.findLocationsFromCityForm(cityId, companionId, lengthOfStay, categoryIds);
-
-    }
-
-    @GetMapping(value = "/region/locations")
-    public List<Location> getAllLocationsFromRegion(@RequestParam Long regionId,
-                                                    @RequestParam  Long companionId,
-                                                    @RequestParam Long lengthOfStay,
-                                                    @RequestParam String categoryIds){
-        return this.locationService.findLocationsFromRegionForm(regionId, companionId,lengthOfStay, categoryIds);
-    }
-
-    @PostMapping(value = "/add-location")
-    public Location addLocationToPlanner(@RequestBody PlannerLocationDto plannerLocationDto){
-        return this.locationService.addLocationToPlanner(plannerLocationDto);
-    }
-
-    @GetMapping(value = "/planner/locations")
-    public List<Location> getAllLocationsForPlanner (@RequestParam Long plannerId){
-        return this.locationService.getAllLocationsForPlanner(plannerId);
-    }
-
-    @GetMapping(value = "weekend")
-    public List<Location> getWeekendGetaways(){
-        return this.locationService.getWeekendGetaways();
-    }
-
-    @GetMapping(value = "villages")
-    public List<Location> getVillages(){
-        return this.locationService.getVillages();
-    }
-
-    @GetMapping(value = "/planner/locationIds")
-    public List<Long> getAllLocationIdsForPlanner(@RequestParam Long plannerId){
-        return this.locationService.getAllLocationIdsForPlanner(plannerId);
-    }
-
-    @GetMapping(value = "/all")
-    public List<Location> getAllLocations(@RequestParam String place){
-        return this.locationService.getAllLocations(place);
-    }
-
-    @PostMapping("/add")
-    public ResponseEntity<Location> save(@RequestBody LocationDto locationDto, Authentication authentication) {
-        User user = (User) authentication.getPrincipal();
-        return this.locationService.save(locationDto, user.getUsername())
-                .map(location -> ResponseEntity.ok().body(location))
-                .orElseGet(() -> ResponseEntity.badRequest().build());
+    @PostMapping(value = "/trip/locations")
+    public List<Location> allLocationsAfterSubmittedForm(@RequestParam(required = false) String locName,
+                                                         @RequestParam(required = false)  String companion,
+                                                         @RequestParam(required = false) String region,
+                                                         @RequestParam(required = false) List<String> categories,
+                                                         @RequestParam(required = false)  int numberOfDays)  {
+        List<Location> generatedLocations = this.locationService.scheduleLocations(locName, companion, region, categories, numberOfDays);
+        if(locName.equals("Macedonia")){
+            return generatedLocations;
+        }else{
+            return generatedLocations;
+        }
     }
 }
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/PlannerRestController.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/PlannerRestController.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/PlannerRestController.java	(revision 6a3a178323fd905112b5392bd9d3cb83b66ef2d3)
@@ -3,7 +3,5 @@
 import finki.diplomska.tripplanner.models.Location;
 import finki.diplomska.tripplanner.models.Planner;
-import finki.diplomska.tripplanner.models.User;
 import finki.diplomska.tripplanner.models.dto.PlannerDto;
-import finki.diplomska.tripplanner.models.dto.PlannerLocationDto;
 import finki.diplomska.tripplanner.service.LocationService;
 import finki.diplomska.tripplanner.service.PlannerService;
@@ -11,9 +9,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
-import org.springframework.security.core.Authentication;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.validation.Valid;
 import java.util.ArrayList;
 import java.util.List;
@@ -21,5 +17,5 @@
 
 @RestController
-@CrossOrigin(origins = "http://localhost:4200",  exposedHeaders = "token")
+@CrossOrigin(origins = "http://localhost:4200")
 @RequestMapping(value = "/api")
 public class PlannerRestController {
@@ -35,11 +31,4 @@
     public List<Planner> getAllPlanners(){
         return this.plannerService.getAllPlaners();
-    }
-
-
-    @GetMapping(value = "/planners/user")
-    public List<Planner> getPlannersByUser(Authentication authentication){
-        User user = (User) authentication.getPrincipal();
-        return this.plannerService.getPlannersByUser(user.getUsername());
     }
 
@@ -68,7 +57,6 @@
     @PostMapping(value = "/planner/new", consumes= MediaType.APPLICATION_JSON_VALUE)
     @ResponseStatus(HttpStatus.CREATED)
-    public ResponseEntity<?> newPlanner(@Valid @RequestBody PlannerDto plannerDto, Authentication authentication)  {
-        User user = (User) authentication.getPrincipal();
-        return this.plannerService.newPlanner(plannerDto, user.getUsername())
+    public ResponseEntity<Planner> newPlanner(@RequestBody PlannerDto plannerDto)  {
+        return this.plannerService.newPlanner(plannerDto)
                 .map(planner -> ResponseEntity.ok().body(planner))
                 .orElseGet(() -> ResponseEntity.badRequest().build());
@@ -77,22 +65,13 @@
 
     @PutMapping(value ="edit/planner/{id}", consumes= MediaType.APPLICATION_JSON_VALUE)
-    public ResponseEntity<Planner> editPlanner(@PathVariable Long id, @Valid @RequestBody PlannerDto plannerDto, Authentication authentication){
-        User user = (User) authentication.getPrincipal();
-        return this.plannerService.editPlanner(id, plannerDto, user.getUsername())
+    public ResponseEntity<Planner> editPlanner(@PathVariable Long id, @RequestBody PlannerDto plannerDto){
+        return this.plannerService.editPlanner(id, plannerDto)
                 .map(planner -> ResponseEntity.ok().body(planner))
                 .orElseGet(()-> ResponseEntity.badRequest().build());
     }
 
-    @DeleteMapping("/delete/{id}")
-    public ResponseEntity deleteById(@PathVariable Long id) {
-        this.plannerService.deletePlannerById(id);
-        return this.plannerService.findById(id)
-                .map(planner -> ResponseEntity.ok().body(planner))
-                .orElseGet(()-> ResponseEntity.notFound().build());
-    }
-
-    @DeleteMapping(value = "/delete-location")
-    public ResponseEntity deleteLocationFromPlanner(@RequestBody PlannerLocationDto plannerLocationDto){
-       return  this.plannerService.deleteLocationFromPlanner(plannerLocationDto);
+    @PutMapping(value = "/add-location")
+    public Planner addLocationToPlanner(@RequestParam Long lid, @RequestParam Long pid){
+        return this.plannerService.addLocationToPlanner(lid, pid);
     }
 }
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/RegionRestController.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/RegionRestController.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/RegionRestController.java	(revision 6a3a178323fd905112b5392bd9d3cb83b66ef2d3)
@@ -25,8 +25,3 @@
         return this.regionService.findAll();
     }
-
-    @GetMapping(value = "/places")
-    public List<String> getAllCitiesAndRegions(){
-        return this.regionService.getAllCitiesAndRegions();
-    }
 }
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/UserController.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/UserController.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ 	(revision )
@@ -1,83 +1,0 @@
-package finki.diplomska.tripplanner.web.rest;
-
-import finki.diplomska.tripplanner.models.User;
-import finki.diplomska.tripplanner.models.dto.UserDto;
-import finki.diplomska.tripplanner.payload.JWTLoginSucessReponse;
-import finki.diplomska.tripplanner.payload.LoginRequest;
-import finki.diplomska.tripplanner.security.JwtTokenProvider;
-import finki.diplomska.tripplanner.security.SecurityConstants;
-import finki.diplomska.tripplanner.service.UserService;
-import finki.diplomska.tripplanner.service.impl.MapValidationErrorService;
-import finki.diplomska.tripplanner.validator.UserValidator;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.authentication.AuthenticationManager;
-import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
-import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.validation.BindingResult;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.security.core.Authentication;
-
-import javax.validation.Valid;
-import java.util.List;
-import java.util.Optional;
-
-@RestController
-@CrossOrigin(origins = "http://localhost:4200")
-@RequestMapping(value = "/api/users")
-public class UserController {
-
-    @Autowired
-    private MapValidationErrorService mapValidationErrorService;
-
-    @Autowired
-    private UserService userService;
-
-    @Autowired
-    private UserValidator userValidator;
-
-    @Autowired
-    private JwtTokenProvider tokenProvider;
-
-    @Autowired
-    private AuthenticationManager authenticationManager;
-
-    @PostMapping(value = "/login")
-    public ResponseEntity<?> authenticateUser(@Valid @RequestBody LoginRequest loginRequest, BindingResult result){
-        ResponseEntity<?> errorMap = mapValidationErrorService.MapValidationService(result);
-        if(errorMap != null) return errorMap;
-
-        Authentication authentication = authenticationManager.authenticate(
-                new UsernamePasswordAuthenticationToken(
-                        loginRequest.getUsername(),
-                        loginRequest.getPassword()
-                )
-        );
-        SecurityContextHolder.getContext().setAuthentication(authentication);
-        String jwt = SecurityConstants.TOKEN_PREFIX +  tokenProvider.generateToken(authentication);
-        return ResponseEntity.ok(new JWTLoginSucessReponse(true, jwt));
-    }
-
-    @PostMapping(value = "/register")
-    public ResponseEntity<?> registerUser(@Valid @RequestBody User user, BindingResult result){
-        // Validate passwords match
-        userValidator.validate(user, result);
-        ResponseEntity<?> errorMap = mapValidationErrorService.MapValidationService(result);
-        if(errorMap != null)return errorMap;
-        User newUser = userService.saveUser(user);
-        return  new ResponseEntity<User>(newUser, HttpStatus.CREATED);
-    }
-
-    @GetMapping(value = "/usernames")
-    public List<String> getAllUsernames (){
-        return this.userService.getAllUsernames();
-    }
-
-    @GetMapping(value = "/password")
-    public Optional<String> getPassword(@RequestBody UserDto userDto){
-
-        return this.userService.getPassword(userDto);
-    }
-
-}
