refactored
Some checks failed
Deploy on push / deploy (push) Failing after 6s

This commit is contained in:
2025-08-17 17:56:31 +03:00
parent e78e12eeee
commit 9a2b792f08
98 changed files with 702 additions and 904 deletions

View File

@@ -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 контекста и проверяет авторизацию.