add /open-all-doors
This commit is contained in:
parent
2134512805
commit
cdfe6373e1
@ -71,7 +71,7 @@ def view_slack_doorboy():
|
||||
command = request.form.get("command")
|
||||
try:
|
||||
door = {
|
||||
"/open-new-door": "backdoor",
|
||||
"/open-all-doors": "outsidedoors",
|
||||
"/open-back-door": "backdoor",
|
||||
"/open-front-door": "frontdoor",
|
||||
"/open-ground-door": "grounddoor",
|
||||
@ -91,6 +91,12 @@ def view_slack_doorboy():
|
||||
else:
|
||||
access_group = "k-space:floor"
|
||||
approved = access_group in member.groups
|
||||
|
||||
doors = [door]
|
||||
if door == "outsidedoors":
|
||||
doors = ["backdoor", "frontdoor", "grounddoor"]
|
||||
|
||||
for door in doors:
|
||||
db.eventlog.insert_one({
|
||||
"method": "slack",
|
||||
"approved": approved,
|
||||
|
Loading…
Reference in New Issue
Block a user