Spaces:
Runtime error
Runtime error
CaesarCloudSync commited on
Commit ·
58447b3
1
Parent(s): 273f410
attempt streaming json response
Browse files
main.py
CHANGED
|
@@ -404,8 +404,8 @@ async def getrevisioncards(authorization: str = Header(None)):
|
|
| 404 |
if email_exists: # Checks if email exists
|
| 405 |
user_revision_cards = list(importcsv.db.accountrevisioncards.find({"email": current_user}))[0]
|
| 406 |
del user_revision_cards["_id"],user_revision_cards["email"]
|
| 407 |
-
return StreamingResponse(iter_df(user_revision_cards), media_type="application/json")
|
| 408 |
-
|
| 409 |
elif not email_exists:
|
| 410 |
return {"message":"No revision cards"} # Send in shape of data
|
| 411 |
except Exception as ex:
|
|
|
|
| 404 |
if email_exists: # Checks if email exists
|
| 405 |
user_revision_cards = list(importcsv.db.accountrevisioncards.find({"email": current_user}))[0]
|
| 406 |
del user_revision_cards["_id"],user_revision_cards["email"]
|
| 407 |
+
#return StreamingResponse(iter_df(user_revision_cards), media_type="application/json")
|
| 408 |
+
return user_revision_cards
|
| 409 |
elif not email_exists:
|
| 410 |
return {"message":"No revision cards"} # Send in shape of data
|
| 411 |
except Exception as ex:
|