Spaces:
Sleeping
Sleeping
alanchen1115
commited on
Update main.py
Browse files
main.py
CHANGED
@@ -29,11 +29,11 @@ line_handler = WebhookHandler("7b9984bbc5c62445a79b95b15e34b727")
|
|
29 |
working_status = os.getenv("DEFALUT_TALKING", default = "true").lower() == "true"
|
30 |
|
31 |
@app.get("/")
|
32 |
-
|
33 |
return {"title": "Echo Bot"}
|
34 |
|
35 |
-
|
36 |
-
|
37 |
# get X-Line-Signature header value
|
38 |
signature = request.headers['X-Line-Signature']
|
39 |
# get request body as text
|
|
|
29 |
working_status = os.getenv("DEFALUT_TALKING", default = "true").lower() == "true"
|
30 |
|
31 |
@app.get("/")
|
32 |
+
def root():
|
33 |
return {"title": "Echo Bot"}
|
34 |
|
35 |
+
@app.post("/webhook")
|
36 |
+
async def callback(request: Request)
|
37 |
# get X-Line-Signature header value
|
38 |
signature = request.headers['X-Line-Signature']
|
39 |
# get request body as text
|