From 221aa0e120a1813b8adcb50c72a2080ee17f0bc0 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 7 May 2024 12:54:32 +0300 Subject: [PATCH] request method --- app/main.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 6e5e8f9..716427e 100644 --- a/app/main.py +++ b/app/main.py @@ -37,8 +37,16 @@ async def intgr(request: Request): return {"status": "success"} -@app.all("/integration_tg") -async def tg_intgr(request: Request): +@app.get("/integration_tg") +async def tg_intgr_get(request: Request): + body = await request.json() + logger.info(body) + + return {"status": "success"} + + +@app.post("/integration_tg") +async def tg_intgr_post(request: Request): body = await request.json() logger.info(body)