feat: Add user profile management and password change endpoints
This commit is contained in:
@@ -59,3 +59,13 @@ class UserOauthRepository(BaseRepository[UserOauth]):
|
||||
raise
|
||||
else:
|
||||
return result.first()
|
||||
|
||||
async def get_by_user_id(self, user_id: int) -> list[UserOauth]:
|
||||
"""Get all OAuth providers for a user."""
|
||||
try:
|
||||
statement = select(UserOauth).where(UserOauth.user_id == user_id)
|
||||
result = await self.session.exec(statement)
|
||||
return list(result.all())
|
||||
except Exception:
|
||||
logger.exception("Failed to get OAuth providers for user ID: %s", user_id)
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user