m8chaa commited on
Commit
40b1dfb
·
verified ·
1 Parent(s): e702ab6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -404,10 +404,9 @@ async def http_exception_handler(request: Request, exc: HTTPException):
404
  )
405
 
406
  @app.post('/check-userdoc')
407
- async def update_user_doc(request:Request , background_tasks: BackgroundTasks):
408
- body = await request.body()
409
- print(body)
410
- user_doc = users_ref.document(body['currentUserUid'])
411
  doc_snapshot = user_doc.get()
412
  if doc_snapshot.exists:
413
  return {"dbUserExists": True, "user": doc_snapshot.to_dict()}
 
404
  )
405
 
406
  @app.post('/check-userdoc')
407
+ async def update_user_doc(currentUserUid:str , background_tasks: BackgroundTasks):
408
+ print(currentUserUid)
409
+ user_doc = users_ref.document(currentUserUid)
 
410
  doc_snapshot = user_doc.get()
411
  if doc_snapshot.exists:
412
  return {"dbUserExists": True, "user": doc_snapshot.to_dict()}