Skip to content

Commit

Permalink
redirect root to /docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil Okhlopkov committed Jan 12, 2022
1 parent 59eaa21 commit ab07eb5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.py
@@ -1,6 +1,7 @@
from dotenv import load_dotenv

from fastapi import FastAPI, HTTPException
from starlette.responses import RedirectResponse

from etherscan.consts import ETHERSCAN_BASE_URL
from etherscan.readcontract.parser import (
Expand All @@ -13,6 +14,10 @@

load_dotenv()

@app.get("/")
async def docs_redirect():
return RedirectResponse(url='/docs')


@app.get("/{chain_id}/{contract_address}/readcontract")
async def etherscan_readcontract(chain_id: int, contract_address: str):
Expand Down

0 comments on commit ab07eb5

Please sign in to comment.