cbensimon HF staff commited on
Commit
3b04c28
·
1 Parent(s): d760545
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -23,13 +23,13 @@ items = []
23
  url_re = re.compile(r'https://s3\.amazonaws\.com/moonup/production/uploads/\d+-noauth\.jpeg')
24
 
25
  @app.get("/")
26
- async def get_events():
27
  return items
28
 
29
  @app.post("/webhook")
30
- async def webhook(request: Request):
31
  global items
32
- payload = await request.json()
33
  event = payload["event"]
34
  if event["action"] != "create":
35
  return
 
23
  url_re = re.compile(r'https://s3\.amazonaws\.com/moonup/production/uploads/\d+-noauth\.jpeg')
24
 
25
  @app.get("/")
26
+ def get_events():
27
  return items
28
 
29
  @app.post("/webhook")
30
+ def webhook(request: Request):
31
  global items
32
+ payload = request.json()
33
  event = payload["event"]
34
  if event["action"] != "create":
35
  return