From 56775123c3983c837ff4bf58223117113d531731 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 7 May 2024 13:33:37 +0300 Subject: [PATCH] remove get --- app/main.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/app/main.py b/app/main.py index 435822e..62a0385 100644 --- a/app/main.py +++ b/app/main.py @@ -37,24 +37,13 @@ async def intgr(request: Request): return {"status": "success"} -@app.get("/integration_tg") +@app.post("/integration_tg") async def tg_intgr_get(request: Request): try: - body = await request.json() + body = await request.body() logger.info(body) return {"status": "success"} except: logger.info(request.__dict__) - return {"status": "error"} - -@app.post("/integration_tg") -async def tg_intgr_post(request: Request): - try: - body = await request.json() - logger.info(body) - - return {"status": "success"} - except: - logger.info(request.__dict__) - return {"status": "error"} + return {"status": "error"} \ No newline at end of file