Skip to content

Commit

Permalink
re-enable interrupts
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi committed Dec 18, 2023
1 parent 59ad5ad commit b45f3ab
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,20 +307,26 @@ def faq():
return render_template("faq.jinja")


# @app.route('/interrupt')
# def saal():
# interrupt_key = get_scoped_api_key([{
# "Action": "device:node-message",
# "Condition": {
# "StringEquals": {
# "message:path": "root/remote/trigger"
# }
# },
# "Effect": "allow",
# }], expire=300, uses=20)
# return render_template('interrupt.jinja',
# interrupt_key = interrupt_key,
# )
if "INTERRUPT_KEY" in app.config:
@app.route("/interrupt/{}".format(app.config["INTERRUPT_KEY"]))
def saal():
interrupt_key = get_scoped_api_key(
[
{
"Action": "device:node-message",
"Condition": {
"StringEquals": {"message:path": "root/remote/trigger"}
},
"Effect": "allow",
}
],
expire=300,
uses=20,
)
return render_template(
"interrupt.jinja",
interrupt_key=interrupt_key,
)


@app.route("/dashboard")
Expand Down

0 comments on commit b45f3ab

Please sign in to comment.