Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -34,9 +34,8 @@ def root():
|
|
| 34 |
|
| 35 |
@app.post("/webhook")
|
| 36 |
async def webhook(request: Request, x_line_signature: str = Header(None)):
|
| 37 |
-
body = await request.body()
|
| 38 |
try:
|
| 39 |
-
line_handler.handle(body.decode(), x_line_signature)
|
| 40 |
except InvalidSignatureError:
|
| 41 |
raise HTTPException(status_code=400, detail="chatbot handle body error.")
|
| 42 |
return 'OK'
|
|
|
|
| 34 |
|
| 35 |
@app.post("/webhook")
|
| 36 |
async def webhook(request: Request, x_line_signature: str = Header(None)):
|
|
|
|
| 37 |
try:
|
| 38 |
+
line_handler.handle(request.body().decode(), x_line_signature)
|
| 39 |
except InvalidSignatureError:
|
| 40 |
raise HTTPException(status_code=400, detail="chatbot handle body error.")
|
| 41 |
return 'OK'
|