youssef1214 commited on
Commit
89d073d
1 Parent(s): f2cee81

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -0
main.py CHANGED
@@ -233,6 +233,7 @@ async def read_root(request:Request):
233
  raise HTTPException(status_code=400, detail="Missing email value")
234
  @app.post("/verifyOTP")
235
  async def read_root(request:Request):
 
236
  if 'email' in json_data and 'otpcode' in json_data:
237
  if json_data['otpcode'] ==emailOTP[json_data['email']] :
238
  return "OTP verified succesufully "
 
233
  raise HTTPException(status_code=400, detail="Missing email value")
234
  @app.post("/verifyOTP")
235
  async def read_root(request:Request):
236
+ json_data = await request.json()
237
  if 'email' in json_data and 'otpcode' in json_data:
238
  if json_data['otpcode'] ==emailOTP[json_data['email']] :
239
  return "OTP verified succesufully "