Skip to content

Commit

Permalink
[IMP] prefixed local method with underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
c8y3 committed Mar 15, 2024
1 parent 0211ccb commit e9b1c91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/app/blueprints/graphql/graphql_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def resolve_goodbye(root, info):
# TypeError: dispatch_request() got an unexpected keyword argument 'caseid'
# so I rewrote a simpler decorator...
# Maybe, no decorator is needed (since graphql needs only one endpoint) => try to write code directly
def ac_graphql_requires(f):
def _ac_graphql_requires(f):
@wraps(f)
def wrap(*args, **kwargs):
if request.method == 'POST':
Expand All @@ -66,7 +66,7 @@ def wrap(*args, **kwargs):
def _create_blueprint():
schema = Schema(query=Query)
graphql_view = GraphQLView.as_view('graphql', schema=schema)
graphql_view_with_authentication = ac_graphql_requires(graphql_view)
graphql_view_with_authentication = _ac_graphql_requires(graphql_view)

blueprint = Blueprint('graphql', __name__)
blueprint.add_url_rule('/graphql', view_func=graphql_view_with_authentication, methods=['POST'])
Expand Down

0 comments on commit e9b1c91

Please sign in to comment.