Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Commit

Permalink
Web hook handler OK
Browse files Browse the repository at this point in the history
  • Loading branch information
stdrc committed Sep 29, 2016
1 parent 0eef030 commit 300c0c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ def search():
if C.get('webhook_enable', False):
@app.route('/_webhook', strict_slashes=True, methods=['POST'])
def webhook():
# try:
from custom import webhook_handler as h
# if h.handle:
h.handle(request.json or request.form)
# except ImportError:
# print('There is no webhook handler.')
try:
from custom import webhook_handler as h
if h.handle:
h.handle(request.json or request.form)
except ImportError:
print('There is no webhook handler.')
return '', 204


Expand Down
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
host='0.0.0.0',
port=8080,
mode='mixed', # 'web-app' or 'api' or 'mixed'
webhook_enable=True,
webhook_enable=False,
)

0 comments on commit 300c0c5

Please sign in to comment.