We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e31aad6 commit 20c49c2Copy full SHA for 20c49c2
app/main.py
@@ -129,8 +129,8 @@ def get_all_locations(country_code: str = None, timelines: int = 0):
129
130
131
@APP.get("/locations/{id}", response_model=Location)
132
-def get_location_by_id(id: int):
133
- return
+def get_location_by_id(request: fastapi.Request, id: int, timelines: int = 1):
+ return {"location": request.state.source.get(id).serialize(timelines)}
134
135
136
if __name__ == "__main__":
0 commit comments