Skip to content

Commit

Permalink
Fix indentation caused errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanzhou authored Jun 12, 2023
1 parent c90dad9 commit 2388d5c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,9 +835,6 @@ def get_entity_types():
@app.route('/<entity_type>/entities', methods = ['GET'])
def get_entities_by_type(entity_type):
final_result = []

# Get user token from Authorization header. Since this endpoint is not exposed through the AWS Gateway,
token = get_user_token(request)

# Normalize user provided entity_type
normalized_entity_type = schema_manager.normalize_entity_type(entity_type)
Expand Down Expand Up @@ -896,13 +893,16 @@ def get_entities_by_type(entity_type):
# Get back a list of public collections dicts
entities_list = app_neo4j_queries.get_public_collections(neo4j_driver_instance)
else:
# Get user token from Authorization header. Since this endpoint is not exposed through the AWS Gateway
token = get_user_token(request)

# Get back a list of entity dicts for the given entity type
entities_list = app_neo4j_queries.get_entities_by_type(neo4j_driver_instance, normalized_entity_type)

complete_entities_list = schema_manager.get_complete_entities_list(token, entities_list, generated_properties_to_skip)
complete_entities_list = schema_manager.get_complete_entities_list(token, entities_list, generated_properties_to_skip)

# Final result after normalization
final_result = schema_manager.normalize_entities_list_for_response(complete_entities_list)
# Final result after normalization
final_result = schema_manager.normalize_entities_list_for_response(complete_entities_list)

# Response with the final result
return jsonify(final_result)
Expand Down

0 comments on commit 2388d5c

Please sign in to comment.