Skip to content

Commit 21e952c

Browse files
committed
expose v1 and v2 apis via mounted WSGI app
1 parent 86617e6 commit 21e952c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,10 @@ def get_location_by_id(request: fastapi.Request, id: int, timelines: int = 1):
123123
return {"location": request.state.source.get(id).serialize(timelines)}
124124

125125

126-
# mount the existing Flask app to /v2
127-
APP.mount("/v2", WSGIMiddleware(create_app()))
126+
# mount the existing Flask app
127+
# v1 @ /
128+
# v2 @ /v2
129+
APP.mount("/", WSGIMiddleware(create_app()))
128130

129131
if __name__ == "__main__":
130132
uvicorn.run(

0 commit comments

Comments
 (0)