Merge modifications for more separate backend functions #69

Open
kscheidecker wants to merge 39 commits from backend/micro-services-restructuring into main
Showing only changes of commit bfc0c9adae - Show all commits

View File

@@ -64,9 +64,10 @@ def get_landmarks(
@router.post("/get-nearby/landmarks/{lat}/{lon}")
def get_landmarks_nearby(
lat: float,
lon: float
) -> list[Landmark] :
lat: float,
lon: float,
allow_clusters: bool = False
) -> list[Landmark] :
"""
Suggests nearby landmarks based on a given latitude and longitude.
@@ -76,6 +77,7 @@ def get_landmarks_nearby(
Args:
lat (float): Latitude of the user's current location.
lon (float): Longitude of the user's current location.
allow_clusters (bool): Whether or not to allow the search for shopping/historical clusters when looking for nearby landmarks.
Returns:
list[Landmark]: A list of selected nearby landmarks.
@@ -104,7 +106,7 @@ def get_landmarks_nearby(
landmarks_around = manager.generate_landmarks_list(
center_coordinates = (lat, lon),
kscheidecker marked this conversation as resolved
Review

should this be a landmark-parameter? No need to let the user choose that option. But it might be intersting to allow this to be set at runtime instead of hardcoding it.

should this be a landmark-parameter? No need to let the user choose that option. But it might be intersting to allow this to be set at runtime instead of hardcoding it.
Review

Also a good point! Implemented in commit bfc0c9adae

Also a good point! Implemented in commit [bfc0c9adae](https://git.kluster.moll.re/anydev/anyway/commit/bfc0c9adae3877d59f4127e94e2a4916d9072a7b)
preferences = prefs,
allow_clusters=False,
allow_clusters=allow_clusters,
)
if len(landmarks_around) == 0 :