Skip to content

Commit

Permalink
fix: add tags to fastapi router and fix function names
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasbhat0 committed Oct 6, 2024
1 parent 40286c4 commit be6875c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions icon_governance/api/v1/endpoints/delegations.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


@router.get("/governance/delegations/{address}")
async def get_delegations(
async def get_delegations_by_address(
response: Response,
address: str,
skip: int = Query(0),
Expand Down Expand Up @@ -46,7 +46,7 @@ async def get_delegations(


@router.get("/governance/votes/{address}")
async def get_delegations(
async def get_votes_by_address(
address: str,
response: Response,
skip: int = Query(0),
Expand Down
2 changes: 1 addition & 1 deletion icon_governance/api/v1/endpoints/preps.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async def get_preps(


@router.get("/governance/preps/{address}")
async def get_prep(
async def get_preps_by_address(
address: str,
session: AsyncSession = Depends(get_session),
) -> List[Prep]:
Expand Down
2 changes: 1 addition & 1 deletion icon_governance/api/v1/endpoints/rewards.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


@router.get("/governance/rewards/{address}")
async def get_delegations(
async def get_rewards_by_address(
response: Response,
address: str,
skip: int = Query(0),
Expand Down
2 changes: 1 addition & 1 deletion icon_governance/api/v1/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
stats,
)

api_router = APIRouter()
api_router = APIRouter(tags=["governance"])
api_router.include_router(preps.router)
api_router.include_router(delegations.router)
api_router.include_router(proposals.router)
Expand Down

0 comments on commit be6875c

Please sign in to comment.