aiteamutils 0.2.6__py3-none-any.whl → 0.2.8__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- aiteamutils/dependencies.py +11 -4
- aiteamutils/validators.py +1 -1
- aiteamutils/version.py +1 -1
- {aiteamutils-0.2.6.dist-info → aiteamutils-0.2.8.dist-info}/METADATA +1 -1
- {aiteamutils-0.2.6.dist-info → aiteamutils-0.2.8.dist-info}/RECORD +6 -6
- {aiteamutils-0.2.6.dist-info → aiteamutils-0.2.8.dist-info}/WHEEL +0 -0
aiteamutils/dependencies.py
CHANGED
@@ -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(
|
aiteamutils/validators.py
CHANGED
@@ -6,7 +6,7 @@ from sqlalchemy import Table
|
|
6
6
|
from sqlalchemy.ext.asyncio import AsyncSession
|
7
7
|
from fastapi import Request
|
8
8
|
from inspect import signature
|
9
|
-
from pydantic import BaseModel
|
9
|
+
from pydantic import BaseModel, field_validator
|
10
10
|
import re
|
11
11
|
|
12
12
|
from .exceptions import ErrorCode, CustomException
|
aiteamutils/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"""버전 정보"""
|
2
|
-
__version__ = "0.2.
|
2
|
+
__version__ = "0.2.8"
|
@@ -5,12 +5,12 @@ aiteamutils/base_service.py,sha256=E4dHGE0DvhmRyFplh46SwKJOSF_nUL7OAsCkf_ZJF_8,2
|
|
5
5
|
aiteamutils/cache.py,sha256=tr0Yn8VPYA9QHiKCUzciVlQ2J1RAwNo2K9lGMH4rY3s,1334
|
6
6
|
aiteamutils/config.py,sha256=vC6k6E2-Y4mD0E0kw6WVgSatCl9K_BtTwrVFhLrhCzs,665
|
7
7
|
aiteamutils/database.py,sha256=U71cexPsSmMTKgp098I574PupqnuPltujI4QKHBG2Cc,29952
|
8
|
-
aiteamutils/dependencies.py,sha256=
|
8
|
+
aiteamutils/dependencies.py,sha256=vzhPBbm_5eBj27hCPWkn7D1jInqhpWrkc8O7o3ElDYY,5111
|
9
9
|
aiteamutils/enums.py,sha256=ipZi6k_QD5-3QV7Yzv7bnL0MjDz-vqfO9I5L77biMKs,632
|
10
10
|
aiteamutils/exceptions.py,sha256=YV-ISya4wQlHk4twvGo16I5r8h22-tXpn9wa-b3WwDM,15231
|
11
11
|
aiteamutils/security.py,sha256=AZszaTxVEGi1jU1sX3QXHGgshp1lVvd0xXvZejXvs_w,12643
|
12
|
-
aiteamutils/validators.py,sha256=
|
13
|
-
aiteamutils/version.py,sha256=
|
14
|
-
aiteamutils-0.2.
|
15
|
-
aiteamutils-0.2.
|
16
|
-
aiteamutils-0.2.
|
12
|
+
aiteamutils/validators.py,sha256=3N245cZFjgwtW_KzjESkizx5BBUDaJLbbxfNO4WOFZ0,7764
|
13
|
+
aiteamutils/version.py,sha256=dHgfYIoXma4GXf9wzfmg8NaD9W8NvLM1qdXO8RZxcAU,43
|
14
|
+
aiteamutils-0.2.8.dist-info/METADATA,sha256=arI-TV-0mrj766iRc582_FkaeKllkbebJnfAYxOK4KE,1717
|
15
|
+
aiteamutils-0.2.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
16
|
+
aiteamutils-0.2.8.dist-info/RECORD,,
|
File without changes
|