cbensimon's picture
cbensimon HF staff
Webhook route
0d68e6c
raw
history blame
268 Bytes
"""
"""
from fastapi import FastAPI
from fastapi import Request
events = []
app = FastAPI()
@app.get("/")
async def get_events():
return events
@app.post("/webhook")
async def webhook(request: Request):
global events
events += [await request.json()]