Skip to content

Commit

Permalink
added user exist check
Browse files Browse the repository at this point in the history
  • Loading branch information
ambujraj committed Mar 2, 2024
1 parent 7c2b490 commit ea89103
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions middleware/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,9 @@ def get_history_return_all_shares_list(user_id: str):
"""
history = []

# user = user_dynamodb.read_item({"user_id": user_id})
# if(user==None):
# raise HTTPException(status_code=400, detail="User does not exist")
user = user_dynamodb.read_item({"user_id": user_id})
if(user==None):
raise HTTPException(status_code=400, detail="User does not exist")

upload_metadatas = dynamodb.read_items("creator_id", user_id)
for upload_metadata in upload_metadatas:
Expand Down

0 comments on commit ea89103

Please sign in to comment.