Mr-Help commited on
Commit
c8b9d38
·
verified ·
1 Parent(s): ef7c555

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -5
main.py CHANGED
@@ -2,10 +2,11 @@ from fastapi import FastAPI, Request
2
 
3
  app = FastAPI()
4
 
5
- @app.post("/")
6
- async def echo(request: Request):
7
- data = await request.json() # Parse the incoming JSON
8
- print("Received:", data) # Print the received data
9
- return {"message": "Received", "data": data} # Return the data as response
 
10
 
11
  # Run the server using: uvicorn filename:app --reload
 
2
 
3
  app = FastAPI()
4
 
5
+ @app.post("/webhook")
6
+ async def receive_webhook(request: Request):
7
+ payload = await request.json()
8
+ print("📥 Webhook received:")
9
+ print(payload)
10
+ return {"status": "ok"}
11
 
12
  # Run the server using: uvicorn filename:app --reload