Skip to content

Commit

Permalink
fix: user id check in update profile api
Browse files Browse the repository at this point in the history
  • Loading branch information
nrjadkry committed Jul 4, 2024
1 parent e907e9d commit 030a1e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/app/users/user_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ async def update_user_profile(
"""

user = await user_crud.get_user_by_id(db, user_id)
if user.id != user_id:
if user_data.id != user_id:
raise HTTPException(
status_code=HTTPStatus.FORBIDDEN,
detail="You are not authorized to update profile",
Expand Down

0 comments on commit 030a1e3

Please sign in to comment.