Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -2,10 +2,11 @@ from fastapi import FastAPI, Request
|
|
| 2 |
|
| 3 |
app = FastAPI()
|
| 4 |
|
| 5 |
-
@app.post("/")
|
| 6 |
-
async def
|
| 7 |
-
|
| 8 |
-
print("
|
| 9 |
-
|
|
|
|
| 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
|