From e0237b7dacb07e001ab8fc7f1916def7d970cd96 Mon Sep 17 00:00:00 2001 From: Sujan Adhikari <109404840+Sujanadh@users.noreply.github.com> Date: Fri, 22 Mar 2024 02:36:08 +0545 Subject: [PATCH] fix: update user profile image (#1373) Co-authored-by: sujanadh --- src/backend/app/auth/auth_routes.py | 2 +- src/backend/app/auth/osm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/app/auth/auth_routes.py b/src/backend/app/auth/auth_routes.py index 6b7624ce47..37a178afc8 100644 --- a/src/backend/app/auth/auth_routes.py +++ b/src/backend/app/auth/auth_routes.py @@ -153,7 +153,7 @@ async def get_or_create_user( { "user_id": user_data.id, "username": user_data.username, - "profile_img": user_data.profile_img, + "profile_img": user_data.img_url, "role": role, "mapping_level": "BEGINNER", "current_date": datetime.now(timezone.utc), diff --git a/src/backend/app/auth/osm.py b/src/backend/app/auth/osm.py index a257f59147..0122bcd604 100644 --- a/src/backend/app/auth/osm.py +++ b/src/backend/app/auth/osm.py @@ -41,7 +41,7 @@ class AuthUser(BaseModel): id: int username: str - profile_img: Optional[str] = None + img_url: Optional[str] = None role: Optional[UserRole] = UserRole.MAPPER