alanchen1115 commited on
Commit
bfdda2a
·
verified ·
1 Parent(s): 3d990b9

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -2
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'