Closed Darjusch closed 1 year ago
Gets the Kita List ( currently from the S3 Bucket ) Calculates the distance of the lat, lon in the request to the Kitas. Sends the List of Kitas back with the distance in km.
To test run a request to the endpoint:
http://localhost:3000/location-service
With a body:
{ "lat": "52.46325534055021", "lon": "13.382004424798547"
}
lat / lon can be provided as int or string.
A middleware is checking if one or both are missing, if that is the case a Error is returned explaining what is missing.
The middleware can be used for the get Kitas endpoint aswell.
Radius added for filtering Kitas and reducing the size of the request.
{ "lat": "52.46325534055021", "lon": "13.382004424798547", "radius": "2" }
Send the radius as String. Decimal places work.
Gets the Kita List ( currently from the S3 Bucket ) Calculates the distance of the lat, lon in the request to the Kitas. Sends the List of Kitas back with the distance in km.
To test run a request to the endpoint:
http://localhost:3000/location-service
With a body:
{ "lat": "52.46325534055021", "lon": "13.382004424798547"
}
lat / lon can be provided as int or string.
A middleware is checking if one or both are missing, if that is the case a Error is returned explaining what is missing.
The middleware can be used for the get Kitas endpoint aswell.