Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -404,12 +404,6 @@ async def http_exception_handler(request: Request, exc: HTTPException):
|
|
| 404 |
)
|
| 405 |
|
| 406 |
@app.post('/check-userdoc')
|
| 407 |
-
async def
|
| 408 |
-
print(currentUserUid)
|
| 409 |
user_doc = users_ref.document(currentUserUid)
|
| 410 |
-
|
| 411 |
-
if doc_snapshot.exists:
|
| 412 |
-
print(doc_snapshot.to_dict())
|
| 413 |
-
return {"dbUserExists": True, "user": doc_snapshot.to_dict()}
|
| 414 |
-
else:
|
| 415 |
-
return {"dbUserExists": False}
|
|
|
|
| 404 |
)
|
| 405 |
|
| 406 |
@app.post('/check-userdoc')
|
| 407 |
+
async def check_user_doc(currentUserUid: str = Form(...)):
|
|
|
|
| 408 |
user_doc = users_ref.document(currentUserUid)
|
| 409 |
+
return {"dbUserExists": user_doc.get().exists}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|