This commit is contained in:
parent
e28f03d7db
commit
fceb3b61c7
|
@ -349,7 +349,7 @@ type Query {
|
||||||
get_authors_all: [Author]
|
get_authors_all: [Author]
|
||||||
get_author_followers(slug: String, user: String, author_id: Int): [Author]
|
get_author_followers(slug: String, user: String, author_id: Int): [Author]
|
||||||
get_author_followed(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
|
# community
|
||||||
get_community: Community
|
get_community: Community
|
||||||
|
|
|
@ -7,7 +7,6 @@ from starlette.exceptions import HTTPException
|
||||||
from settings import AUTH_SECRET, AUTH_URL
|
from settings import AUTH_SECRET, AUTH_URL
|
||||||
|
|
||||||
|
|
||||||
logging.basicConfig()
|
|
||||||
logger = logging.getLogger('\t[services.auth]\t')
|
logger = logging.getLogger('\t[services.auth]\t')
|
||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
|
@ -23,7 +22,7 @@ async def request_data(gql, headers=None):
|
||||||
data = await response.json()
|
data = await response.json()
|
||||||
errors = data.get('errors')
|
errors = data.get('errors')
|
||||||
if errors:
|
if errors:
|
||||||
logger.error(f'[services.auth] errors: {errors}')
|
logger.error(f'HTTP Errors: {errors}')
|
||||||
else:
|
else:
|
||||||
return data
|
return data
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -37,7 +36,7 @@ async def check_auth(req) -> str | None:
|
||||||
user_id = ''
|
user_id = ''
|
||||||
if token:
|
if token:
|
||||||
# Logging the authentication token
|
# Logging the authentication token
|
||||||
logger.error(f'[services.auth] checking auth token: {token}')
|
logger.debug(f'{token}')
|
||||||
query_name = 'validate_jwt_token'
|
query_name = 'validate_jwt_token'
|
||||||
operation = 'ValidateToken'
|
operation = 'ValidateToken'
|
||||||
variables = {
|
variables = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user