aiteamutils 0.2.7__tar.gz → 0.2.8__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiteamutils
3
- Version: 0.2.7
3
+ Version: 0.2.8
4
4
  Summary: AI Team Utilities
5
5
  Project-URL: Homepage, https://github.com/yourusername/aiteamutils
6
6
  Project-URL: Issues, https://github.com/yourusername/aiteamutils/issues
@@ -1,4 +1,4 @@
1
- from typing import Type, Dict, Tuple, Any
1
+ from typing import Type, Dict, Tuple, Any, AsyncGenerator, Callable
2
2
  from sqlalchemy.ext.asyncio import AsyncSession
3
3
  from fastapi import Depends, status
4
4
  from fastapi.security import OAuth2PasswordBearer
@@ -145,9 +145,16 @@ async def get_current_user(
145
145
  source_function="dependencies.py / get_current_user"
146
146
  )
147
147
 
148
- from app.user.repository import UserRepository
149
- user_repo = UserRepository(db_service)
150
- user = await user_repo.get_user(user_ulid, by="ulid")
148
+ try:
149
+ repository_class, _ = service_registry.get("user")
150
+ user_repo = repository_class(db_service)
151
+ user = await user_repo.get_user(user_ulid, by="ulid")
152
+ except ValueError:
153
+ raise CustomException(
154
+ ErrorCode.SERVICE_NOT_REGISTERED,
155
+ detail="User service is not registered",
156
+ source_function="dependencies.py / get_current_user"
157
+ )
151
158
 
152
159
  if not user:
153
160
  raise CustomException(
@@ -0,0 +1,2 @@
1
+ """버전 정보"""
2
+ __version__ = "0.2.8"
@@ -1,2 +0,0 @@
1
- """버전 정보"""
2
- __version__ = "0.2.7"
File without changes
File without changes
File without changes
File without changes