Index: trip-planner/src/main/java/finki/diplomska/tripplanner/repository/jpa/JpaLocationRepository.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/repository/jpa/JpaLocationRepository.java	(revision b73803523f0488ec52498c2ba88889f1642ad263)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/repository/jpa/JpaLocationRepository.java	(revision 76712b2bf7daeb245c9ca388ce322e0b98098d99)
@@ -109,5 +109,10 @@
     List<Location> getVillages();
 
-    @Query(value = "SELECT * FROM locations AS l WHERE l.id_city = :cityId", nativeQuery = true)
-    List<Location> getLocationsForCity(@Param("cityId") Long cityId);
+    @Query(value = "SELECT * FROM locations AS l " +
+            "LEFT JOIN cities AS c " +
+            "ON l.id_city = c.id_city " +
+            "LEFT JOIN regions AS r " +
+            "ON l.id_region = r.id_region " +
+            "WHERE c.city_name = :place OR r.region_name = :place", nativeQuery = true)
+    List<Location> getAllLocations(@Param("place") String place);
 }
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/repository/jpa/JpaRegionRepository.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/repository/jpa/JpaRegionRepository.java	(revision b73803523f0488ec52498c2ba88889f1642ad263)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/repository/jpa/JpaRegionRepository.java	(revision 76712b2bf7daeb245c9ca388ce322e0b98098d99)
@@ -3,7 +3,16 @@
 import finki.diplomska.tripplanner.models.Region;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
 import org.springframework.stereotype.Repository;
+
+import java.util.List;
 
 @Repository
 public interface JpaRegionRepository extends JpaRepository<Region, Long> {
+
+    @Query(value="SELECT r.region_name " +
+            "FROM regions AS r " +
+            "UNION all " +
+            "SELECT c.city_name FROM cities AS c", nativeQuery = true)
+    List<String> getAllCitiesAndRegions();
 }
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/security/SecurityConfig.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/security/SecurityConfig.java	(revision b73803523f0488ec52498c2ba88889f1642ad263)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/security/SecurityConfig.java	(revision 76712b2bf7daeb245c9ca388ce322e0b98098d99)
@@ -79,4 +79,6 @@
                 .antMatchers("/api/villages").permitAll()
                 .antMatchers("/api/cities").permitAll()
+                .antMatchers("/api/all").permitAll()
+                .antMatchers("/api/places").permitAll()
                 .anyRequest().authenticated();
         http.addFilterBefore(jwtAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class);
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/service/LocationService.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/service/LocationService.java	(revision b73803523f0488ec52498c2ba88889f1642ad263)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/service/LocationService.java	(revision 76712b2bf7daeb245c9ca388ce322e0b98098d99)
@@ -25,4 +25,4 @@
     List<Location> getVillages();
     List<Long> getAllLocationIdsForPlanner(Long plannerId);
-    List<Location> getLocationsForCity(Long cityId);
+    List<Location> getAllLocations(String place);
 }
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/service/RegionService.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/service/RegionService.java	(revision b73803523f0488ec52498c2ba88889f1642ad263)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/service/RegionService.java	(revision 76712b2bf7daeb245c9ca388ce322e0b98098d99)
@@ -7,3 +7,4 @@
 public interface RegionService {
     List<Region> findAll();
+    List<String> getAllCitiesAndRegions();
 }
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/service/impl/LocationServiceImpl.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/service/impl/LocationServiceImpl.java	(revision b73803523f0488ec52498c2ba88889f1642ad263)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/service/impl/LocationServiceImpl.java	(revision 76712b2bf7daeb245c9ca388ce322e0b98098d99)
@@ -185,6 +185,8 @@
 
     @Override
-    public List<Location> getLocationsForCity(Long cityId) {
-        return this.locationRepository.getLocationsForCity(cityId);
+    public List<Location> getAllLocations(String place) {
+        return this.locationRepository.getAllLocations(place);
     }
+
+
 }
Index: trip-planner/src/main/java/finki/diplomska/tripplanner/service/impl/RegionServiceImpl.java
===================================================================
--- trip-planner/src/main/java/finki/diplomska/tripplanner/service/impl/RegionServiceImpl.java	(revision b73803523f0488ec52498c2ba88889f1642ad263)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/service/impl/RegionServiceImpl.java	(revision 76712b2bf7daeb245c9ca388ce322e0b98098d99)
@@ -21,3 +21,8 @@
         return this.regionRepository.findAll();
     }
+
+    @Override
+    public List<String> getAllCitiesAndRegions() {
+        return this.regionRepository.getAllCitiesAndRegions();
+    }
 }
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 b73803523f0488ec52498c2ba88889f1642ad263)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/LocationRestController.java	(revision 76712b2bf7daeb245c9ca388ce322e0b98098d99)
@@ -77,3 +77,8 @@
     }
 
+    @GetMapping(value = "/all")
+    public List<Location> getAllLocations(@RequestParam String place){
+        return this.locationService.getAllLocations(place);
+    }
+
 }
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 b73803523f0488ec52498c2ba88889f1642ad263)
+++ trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/RegionRestController.java	(revision 76712b2bf7daeb245c9ca388ce322e0b98098d99)
@@ -25,3 +25,8 @@
         return this.regionService.findAll();
     }
+
+    @GetMapping(value = "/places")
+    public List<String> getAllCitiesAndRegions(){
+        return this.regionService.getAllCitiesAndRegions();
+    }
 }
