logs-fix
All checks were successful
Deploy to core / deploy (push) Successful in 1m44s

This commit is contained in:
Untone 2024-01-30 14:00:53 +03:00
parent e28f03d7db
commit fceb3b61c7
2 changed files with 3 additions and 4 deletions

View File

@ -349,7 +349,7 @@ type Query {
get_authors_all: [Author]
get_author_followers(slug: String, user: String, author_id: Int): [Author]
get_author_followed(slug: String, user: String, author_id: Int): [Author]
load_authors_by(by: AuthorsBy, limit: Int, offset: Int): [Author]
load_authors_by(by: AuthorsBy!, limit: Int, offset: Int): [Author]
# community
get_community: Community

View File

@ -7,7 +7,6 @@ from starlette.exceptions import HTTPException
from settings import AUTH_SECRET, AUTH_URL
logging.basicConfig()
logger = logging.getLogger('\t[services.auth]\t')
logger.setLevel(logging.DEBUG)
@ -23,7 +22,7 @@ async def request_data(gql, headers=None):
data = await response.json()
errors = data.get('errors')
if errors:
logger.error(f'[services.auth] errors: {errors}')
logger.error(f'HTTP Errors: {errors}')
else:
return data
except Exception as e:
@ -37,7 +36,7 @@ async def check_auth(req) -> str | None:
user_id = ''
if token:
# Logging the authentication token
logger.error(f'[services.auth] checking auth token: {token}')
logger.debug(f'{token}')
query_name = 'validate_jwt_token'
operation = 'ValidateToken'
variables = {