Update door names
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
This commit is contained in:
parent
f53d670189
commit
550136713b
@ -69,7 +69,7 @@ def view_slack_doorboy():
|
||||
return "Invalid channel was supplied"
|
||||
command = request.form.get("command")
|
||||
try:
|
||||
door = {"/open-new-door": "back", "/open-back-door": "back", "/open-front-door": "front", "/open-ground-door": "ground"}[command]
|
||||
door = {"/open-new-door": "backdoor", "/open-back-door": "backdoor", "/open-front-door": "frontdoor", "/open-ground-door": "grounddoor"}[command]
|
||||
except KeyError:
|
||||
return "Invalid command was supplied"
|
||||
|
||||
|
@ -117,7 +117,7 @@ def save_doorboy_edit(token_id):
|
||||
return redirect("/m/doorboy")
|
||||
|
||||
class HoldDoorForm(FlaskForm):
|
||||
door_name = SelectField("Door name", choices=[(j,j) for j in ["ground", "front", "back"]], validators=[DataRequired()])
|
||||
door_name = SelectField("Door name", choices=[(j,j) for j in ["grounddoor", "frontdoor", "backdoor"]], validators=[DataRequired()])
|
||||
duration = IntegerField('Duration in seconds', validators=[DataRequired(), validators.NumberRange(min=5, max=21600)])
|
||||
|
||||
@page_doorboy.route("/m/doorboy/hold", methods=["POST"])
|
||||
@ -141,7 +141,7 @@ def view_doorboy_hold():
|
||||
@login_required
|
||||
def view_doorboy_open(door):
|
||||
user = read_user()
|
||||
if door not in ("ground", "front", "back"): raise
|
||||
if door not in ("grounddoor", "frontdoor", "backdoor"): raise
|
||||
approved = user["username"] in users_lookup
|
||||
db.eventlog.insert_one({
|
||||
"method": "web",
|
||||
|
Loading…
Reference in New Issue
Block a user