Skip to content

Commit d6a0425

Browse files
authored
Merge pull request #161 from igorbenav/delete-comments
remove comments
2 parents d661582 + 38a0bf2 commit d6a0425

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/app/api/dependencies.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from ..core.db.database import async_get_db
88
from ..core.exceptions.http_exceptions import ForbiddenException, RateLimitException, UnauthorizedException
99
from ..core.logger import logging
10-
from ..core.security import TokenType, oauth2_scheme, verify_token # Add TokenType import
10+
from ..core.security import TokenType, oauth2_scheme, verify_token
1111
from ..core.utils.rate_limit import rate_limiter
1212
from ..crud.crud_rate_limit import crud_rate_limits
1313
from ..crud.crud_tier import crud_tiers
@@ -24,7 +24,7 @@
2424
async def get_current_user(
2525
token: Annotated[str, Depends(oauth2_scheme)], db: Annotated[AsyncSession, Depends(async_get_db)]
2626
) -> dict[str, Any] | None:
27-
token_data = await verify_token(token, TokenType.ACCESS, db) # Specify TokenType.ACCESS
27+
token_data = await verify_token(token, TokenType.ACCESS, db)
2828
if token_data is None:
2929
raise UnauthorizedException("User not authenticated.")
3030

@@ -49,7 +49,7 @@ async def get_optional_user(request: Request, db: AsyncSession = Depends(async_g
4949
if token_type.lower() != "bearer" or not token_value:
5050
return None
5151

52-
token_data = await verify_token(token_value, TokenType.ACCESS, db) # Specify TokenType.ACCESS
52+
token_data = await verify_token(token_value, TokenType.ACCESS, db)
5353
if token_data is None:
5454
return None
5555

@@ -95,7 +95,7 @@ async def rate_limiter_dependency(
9595
else:
9696
logger.warning(f"User {user_id} has no assigned tier. Applying default rate limit.")
9797
limit, period = DEFAULT_LIMIT, DEFAULT_PERIOD
98-
else:
98+
else:giot
9999
user_id = request.client.host
100100
limit, period = DEFAULT_LIMIT, DEFAULT_PERIOD
101101

0 commit comments

Comments
 (0)