Skip to content

Commit

Permalink
Merge pull request daveebbelaar#5 from AnubisXHyperX/patch-1
Browse files Browse the repository at this point in the history
Update views.py
  • Loading branch information
daveebbelaar authored Dec 30, 2023
2 parents cecdb21 + b573cde commit 1cab256
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ def verify():
return jsonify({"status": "error", "message": "Missing parameters"}), 400


@webhook_blueprint.route("/webhook", methods=["POST", "GET"])
@webhook_blueprint.route("/webhook", methods=["GET"])
def webhook_get():
return verify()

@webhook_blueprint.route("/webhook", methods=["POST"])
@signature_required
def webhook():
if request.method == "GET":
return verify()
elif request.method == "POST":
return handle_message()
def webhook_post():
return handle_message()


0 comments on commit 1cab256

Please sign in to comment.