Skip to content

Commit

Permalink
fix users endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
elsholz committed Jan 12, 2024
1 parent 32635cc commit 8b170ea
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions api/code/metroplanner_api/v1/endpoints/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
router = APIRouter()


@router.get("/{user_id}")
def get_user(user_id) -> type_definitions.UserPublicGetResponse:
@router.get("/{user_id}/plans")
def get_user(user_id) -> type_definitions.UserPublicDetailedGetResponse:
db = ENV.database
try:
user_id = ObjectId(user_id)
Expand Down Expand Up @@ -79,8 +79,8 @@ def get_user(user_id) -> type_definitions.UserPublicGetResponse:
raise responses.gone_410()


@router.get("/{user_id}/plans")
def get_user(user_id) -> type_definitions.UserPublicDetailedGetResponse:
@router.get("/{user_id}")
def get_user(user_id) -> type_definitions.UserPublicGetResponse:
db = ENV.database
try:
user_id = ObjectId(user_id)
Expand All @@ -103,7 +103,6 @@ def get_user(user_id) -> type_definitions.UserPublicDetailedGetResponse:
if auth0_res.status_code == 200:
auth0_user = loads(auth0_res.content.decode())

print('Test123')
print('Auth0 user:', auth0_user)

if not auth0_user:
Expand Down

0 comments on commit 8b170ea

Please sign in to comment.