Merge modifications for more separate backend functions #69
| @@ -64,9 +64,10 @@ def get_landmarks( | |||||||
|  |  | ||||||
| @router.post("/get-nearby/landmarks/{lat}/{lon}") | @router.post("/get-nearby/landmarks/{lat}/{lon}") | ||||||
| def get_landmarks_nearby( | def get_landmarks_nearby( | ||||||
|     lat: float, |         lat: float, | ||||||
|     lon: float |         lon: float, | ||||||
| ) -> list[Landmark] : |         allow_clusters: bool = False | ||||||
|  |     ) -> list[Landmark] : | ||||||
|     """ |     """ | ||||||
|     Suggests nearby landmarks based on a given latitude and longitude. |     Suggests nearby landmarks based on a given latitude and longitude. | ||||||
|  |  | ||||||
| @@ -76,6 +77,7 @@ def get_landmarks_nearby( | |||||||
|     Args: |     Args: | ||||||
|         lat (float): Latitude of the user's current location. |         lat (float): Latitude of the user's current location. | ||||||
|         lon (float): Longitude 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: |     Returns: | ||||||
|         list[Landmark]: A list of selected nearby landmarks. |         list[Landmark]: A list of selected nearby landmarks. | ||||||
| @@ -104,7 +106,7 @@ def get_landmarks_nearby( | |||||||
|     landmarks_around = manager.generate_landmarks_list( |     landmarks_around = manager.generate_landmarks_list( | ||||||
|         center_coordinates = (lat, lon), |         center_coordinates = (lat, lon), | ||||||
| 
					
					kscheidecker marked this conversation as resolved
					
				 | |||||||
|         preferences = prefs, |         preferences = prefs, | ||||||
|         allow_clusters=False, |         allow_clusters=allow_clusters, | ||||||
|     ) |     ) | ||||||
|  |  | ||||||
|     if len(landmarks_around) == 0 : |     if len(landmarks_around) == 0 : | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	
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.
Also a good point! Implemented in commit bfc0c9adae