Index: trip-planner/src/main/java/finki/diplomska/tripplanner/service/impl/PlannerServiceImpl.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/service/impl/PlannerServiceImpl.java	(revision 571e0df9a7a5e798c9941a85842f785177bedbbd)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/service/impl/PlannerServiceImpl.java	(revision 6a3a178323fd905112b5392bd9d3cb83b66ef2d3)
@@ -3,16 +3,15 @@
 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.models.exceptions.LocationNotFoundException;
 import finki.diplomska.tripplanner.models.exceptions.PlannerNotFoundException;
 import finki.diplomska.tripplanner.repository.jpa.JpaLocationRepository;
 import finki.diplomska.tripplanner.repository.jpa.JpaPlannerRepository;
-import finki.diplomska.tripplanner.repository.jpa.JpaUserRepository;
+import finki.diplomska.tripplanner.service.LocationService;
 import finki.diplomska.tripplanner.service.PlannerService;
-import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
+import reactor.util.annotation.Nullable;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
@@ -23,10 +22,10 @@
     private final JpaPlannerRepository plannerRepository;
     private final JpaLocationRepository locationRepository;
-    private final JpaUserRepository userRepository;
+    private final LocationService locationService;
 
-    public PlannerServiceImpl(JpaPlannerRepository plannerRepository, JpaLocationRepository locationRepository, JpaUserRepository userRepository) {
+    public PlannerServiceImpl(JpaPlannerRepository plannerRepository, JpaLocationRepository locationRepository, LocationService locationService) {
         this.plannerRepository = plannerRepository;
         this.locationRepository = locationRepository;
-        this.userRepository = userRepository;
+        this.locationService = locationService;
     }
 
@@ -37,18 +36,19 @@
 
     @Override
-    public List<Planner> getPlannersByUser(String username) {
-        User user = this.userRepository.findByUsername(username);
-        return this.plannerRepository.getPlannersByUser(user.getUsername());
-    }
-
-    @Override
     public Optional<Planner> findById(Long id) {
         return this.plannerRepository.findById(id);
     }
 
+    @Override
+    public Planner addLocationToPlanner(Long plannerId, Long locationId) {
+        Location location = this.locationService.findById(locationId)
+                .orElseThrow(() -> new LocationNotFoundException(locationId));
+        Planner planner = this.plannerRepository.getById(plannerId);
+        planner.getLocationList().add(location);
+        return this.plannerRepository.save(planner);
+    }
 
     @Override
-    public Optional<Planner> newPlanner(PlannerDto plannerDto, String username) {
-        /*
+    public Optional<Planner> newPlanner(PlannerDto plannerDto) {
         List<Location> locationList  = new ArrayList<>();
         for(Long location : plannerDto.getLocationList()){
@@ -57,19 +57,5 @@
             locationList.add(loc);
         }
-         */
-        User user = this.userRepository.findByUsername(username);
-        plannerDto.setUser(user.getUsername());
-        return Optional.of(this.plannerRepository.save(new Planner(plannerDto.getName(), plannerDto.getDescription(), null, user)));
-    }
-
-    @Override
-    public void deletePlannerById(Long id) {
-        this.plannerRepository.deleteById(id);
-    }
-
-    @Override
-    public ResponseEntity deleteLocationFromPlanner(PlannerLocationDto plannerLocationDto) {
-        plannerRepository.deleteLocationFromPlanner(plannerLocationDto.getPlannerId(), plannerLocationDto.getLocationId());
-        return null;
+        return Optional.of(this.plannerRepository.save(new Planner(plannerDto.getName(), plannerDto.getDescription(),  locationList)));
     }
 
@@ -90,13 +76,10 @@
 
     @Override
-    public Optional<Planner> editPlanner(Long id, PlannerDto plannerDto, String username) {
+    public Optional<Planner> editPlanner(Long id, PlannerDto plannerDto) {
         Planner planner = this.plannerRepository.findById(id).orElseThrow(() -> new PlannerNotFoundException(id));
-        User user = this.userRepository.findByUsername(username);
 
         planner.setName(plannerDto.getName());
         planner.setDescription(plannerDto.getDescription());
-        plannerDto.setUser(user.getUsername());
-        planner.setUser(user);
-/*
+
         List<Location> locationList  = new ArrayList<>();
         for(Long location : plannerDto.getLocationList()){
@@ -106,6 +89,4 @@
         }
         planner.setLocationList(locationList);
-
- */
         return Optional.of(this.plannerRepository.save(planner));
     }
