From 323383329a721c55893be96a39a9a8694c3aa0f7 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 4 Jul 2024 21:02:56 +0400 Subject: [PATCH] test --- selfprivacy_api/graphql/__init__.py | 3 --- selfprivacy_api/graphql/schema.py | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/selfprivacy_api/graphql/__init__.py b/selfprivacy_api/graphql/__init__.py index c34a5b0..4f962f5 100644 --- a/selfprivacy_api/graphql/__init__.py +++ b/selfprivacy_api/graphql/__init__.py @@ -13,9 +13,6 @@ class IsAuthenticated(BasePermission): message = "You must be authenticated to access this resource." def has_permission(self, source: typing.Any, info: Info, **kwargs) -> bool: - connection_params = info.context.get("connection_params") - print("Printing connection params from the ws connect!") - print(connection_params) token = info.context["request"].headers.get("Authorization") if token is None: token = info.context["request"].query_params.get("token") diff --git a/selfprivacy_api/graphql/schema.py b/selfprivacy_api/graphql/schema.py index 05e6bf9..6711e21 100644 --- a/selfprivacy_api/graphql/schema.py +++ b/selfprivacy_api/graphql/schema.py @@ -142,6 +142,9 @@ def authenticated(info: strawberry.types.Info) -> bool: def reject_if_unauthenticated(info: strawberry.types.Info): + connection_params = info.context.get("connection_params") + print("Printing connection params from the ws connect!") + print(connection_params) if not authenticated(info): raise Exception(IsAuthenticated().message)