File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,14 @@ def admin():
105105 return render_template ('admin.html' , username = user ,
106106 users = members .list_users ())
107107
108+ @app .route ("/brus/door/hackeriet/open" , methods = ['POST' ])
109+ @requires_auth
110+ def open_door ():
111+ user = request .authorization .username
112+ signature = '%s (brusweb)' % user
113+ mqtt ('hackeriet/door/hackeriet/open' , signature )
114+ return 'Door triggered'
115+
108116@app .route ("/brus/admin/add" , methods = ['POST' ])
109117@requires_admin
110118def admin_add ():
Original file line number Diff line number Diff line change 66< body >
77< h1 > Hei {{username}}!</ h1 >
88< a href ="
https://logg:[email protected] /brus/account "
> Logg ut
</ a > .
9+
10+ < h2 > Vil du åpne døra?</ h2 >
11+
12+ < form action ="/brus/door/hackeriet/open " method ="post ">
13+ < input type ="submit " name ="btn_opendoor " value ="Trigger Hackeriet door lock ">
14+ </ form >
15+
916< h2 > Din saldo er: {{balance}}</ h2 >
1017
1118< h2 > Fyll på spenn</ h2 >
You can’t perform that action at this time.
0 commit comments