Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertSnows committed Sep 9, 2024
2 parents 4a55a3d + 4ef2c92 commit 01fedf8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions gen3userdatalibrary/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ async def delete_all_lists(request: Request,
authz_resources=[f"/users/{user_id}/user-data-library/"])

start_time = time.time()
user_id = "1" # tood: derive correct user id from token
user_id = "1" # todo: derive correct user id from token

try:
number_of_lists_deleted = await data_access_layer.delete_all_lists(user_id)
Expand Down Expand Up @@ -316,7 +316,7 @@ async def get_status(

try:
await data_access_layer.test_connection()
except Exception:
except Exception as e:
return_status = status.HTTP_500_INTERNAL_SERVER_ERROR
status_text = "UNHEALTHY"

Expand Down Expand Up @@ -347,8 +347,7 @@ async def get_list_by_id(
await authorize_request(
request=request,
authz_access_method="read",
authz_resources=["/gen3_data_library/service_info/status"],
)
authz_resources=["/gen3_data_library/service_info/status"])

return_status = status.HTTP_201_CREATED
status_text = "OK"
Expand All @@ -363,7 +362,7 @@ async def get_list_by_id(
}
}}

except Exception:
except Exception as e:
return_status = status.HTTP_500_INTERNAL_SERVER_ERROR
status_text = "UNHEALTHY"
response = {"status": status_text, "timestamp": time.time()}
Expand All @@ -386,6 +385,8 @@ async def upsert_list_by_id(
Returns:
JSONResponse: simple status and timestamp in format: `{"status": "OK", "timestamp": time.time()}`
:param body:
:param ID:
:param request:
:param data_access_layer:
"""
Expand Down

0 comments on commit 01fedf8

Please sign in to comment.