mirror of
https://github.com/olegvodyanov/docbot.git
synced 2025-12-19 23:57:05 +03:00
add webhook
This commit is contained in:
parent
c4988533c4
commit
932829cd19
15
src/webhook/main.py
Normal file
15
src/webhook/main.py
Normal file
@ -0,0 +1,15 @@
|
||||
from fastapi import FastAPI, Request
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def home():
|
||||
return {"message": "Hello World"}
|
||||
|
||||
|
||||
@app.post("/webhook")
|
||||
async def receive_webhook(request: Request):
|
||||
data = await request.json()
|
||||
# Process your data here
|
||||
return {"message": "Webhook received!"}
|
||||
Loading…
x
Reference in New Issue
Block a user