3 Commits

Author SHA1 Message Date
7f0c75d4d8 doorboy claim: redirect to edit
Incentivize naming tags
2026-07-30 20:02:06 +03:00
7484471b6b doorboy: natu doku 2026-07-30 19:52:17 +03:00
57ba7d1f58 doorboy: fix enable on new tokens 2026-07-30 18:56:59 +03:00
3 changed files with 5 additions and 3 deletions

View File

@@ -34,13 +34,13 @@ def view_doorboy_claim(event_id):
"inventory.owner.username": { "$exists": False } "inventory.owner.username": { "$exists": False }
}, { }, {
"$set": { "$set": {
"token.enabled": datetime.utcnow(), "token.enabled": True,
"inventory.owner.display_name": user["name"], "inventory.owner.display_name": user["name"],
"inventory.owner.username": user["username"] "inventory.owner.username": user["username"]
} }
}) })
return redirect("/m/doorboy") return redirect(f"/m/doorboy/{event_id }/edit")
class TokenEditForm(FlaskForm): class TokenEditForm(FlaskForm):
comment = StringField("Comment") comment = StringField("Comment")

View File

@@ -56,7 +56,7 @@
</p> </p>
<h4>Keycards last seen:</h4> <h4>Keycards last seen:</h4>
Does not include door opens by webhook. Does not include door opens by webhook. Keycards are synced to doors every 3 minutes.
<table> <table>
<thead> <thead>
@@ -90,6 +90,7 @@ Does not include door opens by webhook.
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<p><a href="/m/doorboy/log">All logs</a> (link for admins only)</p>
{% if false %} {% if false %}
<!-- whole section commented out --> <!-- whole section commented out -->

View File

@@ -5,6 +5,7 @@
<h4>Doorboy info for {{subject_user.username | display_name}}</h4> <h4>Doorboy info for {{subject_user.username | display_name}}</h4>
<br/> <br/>
<h5>Users cards:</h5> <h5>Users cards:</h5>
<p>Keycards are synced to doors every 3 minutes.</p>
<table class="striped"> <table class="striped">
<thead> <thead>
<tr> <tr>