Skip to content

Commit

Permalink
Redirect / to /docs
Browse files Browse the repository at this point in the history
  • Loading branch information
salivian committed Mar 17, 2021
1 parent 9b39aa4 commit a62735e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web/bin/db_rest_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
app = FastAPI()
app.add_middleware(CORSMiddleware,allow_origins=['*'])


from starlette.responses import RedirectResponse
@app.get('/')
async def root():
#redirect / to docs
return RedirectResponse(url='/docs')

@app.post('/data')
def data(q:str=Form(...),format:str=Form(...)):
print(q)
Expand Down

0 comments on commit a62735e

Please sign in to comment.