Fixed leading '/' in router.py

This commit is contained in:
Csaba 2024-02-16 16:14:11 +01:00
parent abfaa053c9
commit 09312b4791

View file

@ -32,7 +32,7 @@ def _assert_region_exists(region_id: str) -> Region:
return region return region
@router.get("region/{region_id}/gtfs", @router.get("/region/{region_id}/gtfs",
summary="Return GTFS Feed for this region", summary="Return GTFS Feed for this region",
response_description="GTFS-Feed (zip-file)", response_description="GTFS-Feed (zip-file)",
response_class=FileResponse, response_class=FileResponse,
@ -44,7 +44,7 @@ async def get_file(region_id: str, user: str = Depends(verify_admin_api_key)):
_assert_region_exists(region_id) _assert_region_exists(region_id)
return FileResponse(f'data/gtfs/amarillo.{region_id}.gtfs.zip') return FileResponse(f'data/gtfs/amarillo.{region_id}.gtfs.zip')
@router.get("region/{region_id}/gtfs-rt", @router.get("/region/{region_id}/gtfs-rt",
summary="Return GTFS-RT Feed for this region", summary="Return GTFS-RT Feed for this region",
response_description="GTFS-RT-Feed", response_description="GTFS-RT-Feed",
response_class=FileResponse, response_class=FileResponse,