try cathc
This commit is contained in:
parent
221aa0e120
commit
26f5c8d66e
21
app/main.py
21
app/main.py
|
@ -39,15 +39,22 @@ async def intgr(request: Request):
|
||||||
|
|
||||||
@app.get("/integration_tg")
|
@app.get("/integration_tg")
|
||||||
async def tg_intgr_get(request: Request):
|
async def tg_intgr_get(request: Request):
|
||||||
body = await request.json()
|
try:
|
||||||
logger.info(body)
|
body = await request.json()
|
||||||
|
logger.info(body)
|
||||||
return {"status": "success"}
|
|
||||||
|
|
||||||
|
return {"status": "success"}
|
||||||
|
except:
|
||||||
|
logger.info(request.text)
|
||||||
|
return {"status": "error"}
|
||||||
|
|
||||||
@app.post("/integration_tg")
|
@app.post("/integration_tg")
|
||||||
async def tg_intgr_post(request: Request):
|
async def tg_intgr_post(request: Request):
|
||||||
body = await request.json()
|
try:
|
||||||
logger.info(body)
|
body = await request.json()
|
||||||
|
logger.info(body)
|
||||||
|
|
||||||
return {"status": "success"}
|
return {"status": "success"}
|
||||||
|
except:
|
||||||
|
logger.info(request.text)
|
||||||
|
return {"status": "error"}
|
||||||
|
|
Loading…
Reference in New Issue