This commit is contained in:
@@ -5,28 +5,20 @@ from typing import Any
|
||||
from graphql import GraphQLError, GraphQLResolveInfo
|
||||
from sqlalchemy import exc
|
||||
|
||||
from auth.credentials import AuthCredentials
|
||||
from auth.exceptions import OperationNotAllowedError
|
||||
# Импорт базовых функций из реструктурированных модулей
|
||||
from auth.core import authenticate
|
||||
from auth.utils import get_auth_token
|
||||
from auth.credentials import AuthCredentials
|
||||
from auth.exceptions import OperationNotAllowedError
|
||||
from auth.orm import Author
|
||||
from auth.utils import get_auth_token, get_safe_headers
|
||||
from orm.community import CommunityAuthor
|
||||
from services.db import local_session
|
||||
from services.redis import redis as redis_adapter
|
||||
from storage.db import local_session
|
||||
from settings import ADMIN_EMAILS as ADMIN_EMAILS_LIST
|
||||
from utils.logger import root_logger as logger
|
||||
|
||||
ADMIN_EMAILS = ADMIN_EMAILS_LIST.split(",")
|
||||
|
||||
|
||||
# Импортируем get_safe_headers из utils
|
||||
from auth.utils import get_safe_headers
|
||||
|
||||
|
||||
# get_auth_token теперь импортирован из auth.utils
|
||||
|
||||
|
||||
async def validate_graphql_context(info: GraphQLResolveInfo) -> None:
|
||||
"""
|
||||
Проверяет валидность GraphQL контекста и проверяет авторизацию.
|
||||
|
||||
Reference in New Issue
Block a user