feat: Add user profile management and password change endpoints
Some checks failed
Backend CI / lint (push) Failing after 4m51s
Backend CI / test (push) Successful in 3m38s

This commit is contained in:
JSC
2025-08-09 23:43:20 +02:00
parent 9e07ce393f
commit 0a8b50a0be
4 changed files with 195 additions and 0 deletions

View File

@@ -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