diff --git a/main.py b/main.py index 3ab6c20..21ff5b7 100644 --- a/main.py +++ b/main.py @@ -66,11 +66,21 @@ def list_teams(): player_router = APIRouter(prefix="/player") player_router.add_api_route("/list", endpoint=list_players, methods=["GET"]) -player_router.add_api_route("/add", endpoint=add_player, methods=["POST"]) +player_router.add_api_route( + "/add", + endpoint=add_player, + methods=["POST"], + dependencies=[Depends(get_current_active_user)], +) team_router = APIRouter(prefix="/team") team_router.add_api_route("/list", endpoint=list_teams, methods=["GET"]) -team_router.add_api_route("/add", endpoint=add_team, methods=["POST"]) +team_router.add_api_route( + "/add", + endpoint=add_team, + methods=["POST"], + dependencies=[Depends(get_current_active_user)], +) @app.post("/mvps/", status_code=status.HTTP_200_OK)