Skip to content

Commit

Permalink
/0/routeset: Limit to 100 planes passed
Browse files Browse the repository at this point in the history
Signed-off-by: Katia Esposito <chaufnet@gmail.com>
  • Loading branch information
Katia Esposito authored May 12, 2023
1 parent 01e225b commit b08fdfd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/adsb_api/utils/api_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ async def api_routeset(planeList: PlaneList):
"""
#print(planeList)
response = []
if len(planeList) > 100:
return Response(status_code=400)
for plane in planeList.planes:
route = await get_route_for_callsign_lat_lng(
plane.callsign, plane.lat, plane.lng
Expand Down

0 comments on commit b08fdfd

Please sign in to comment.