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.
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/PKG-INFO +1 -1
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/aiteamutils/dependencies.py +11 -4
- aiteamutils-0.2.8/aiteamutils/version.py +2 -0
- aiteamutils-0.2.7/aiteamutils/version.py +0 -2
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/.gitignore +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/README.md +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/aiteamutils/__init__.py +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/aiteamutils/base_model.py +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/aiteamutils/base_repository.py +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/aiteamutils/base_service.py +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/aiteamutils/cache.py +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/aiteamutils/config.py +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/aiteamutils/database.py +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/aiteamutils/enums.py +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/aiteamutils/exceptions.py +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/aiteamutils/security.py +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/aiteamutils/validators.py +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/pyproject.toml +0 -0
- {aiteamutils-0.2.7 → aiteamutils-0.2.8}/setup.py +0 -0
@@ -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
|
-
|
149
|
-
|
150
|
-
|
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(
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|