feat: webhook info page on / and always show phone status in dashboard

- GET / on port 8081 shows API usage info instead of 404
- Dashboard always shows phone badge (Telefoniert/Frei) alongside AIDA and Teams

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Mueller 2026-04-23 23:22:02 +02:00
parent 7f2858aab6
commit 73f25c4c7e
2 changed files with 17 additions and 0 deletions

View File

@ -84,6 +84,8 @@
{% if seg.phone %}
<span class="badge bg-danger"><i class="bi bi-telephone-fill"></i> Telefoniert</span>
{% else %}
<span class="badge bg-light text-dark"><i class="bi bi-telephone"></i> Frei</span>
{% endif %}
</div>
{% endif %}

View File

@ -13,6 +13,21 @@ logger = logging.getLogger(__name__)
webhook_app = FastAPI(title="Busylight Webhook")
@webhook_app.get("/", response_class=PlainTextResponse)
async def webhook_info():
return """Busylight Webhook API (Telefonanlage)
Endpoints:
GET/POST /{durchwahl}/callstart - Anruf gestartet (WLED -> Rot)
GET/POST /{durchwahl}/callend - Anruf beendet (WLED -> zurueck auf Teams-Status)
Beispiel:
curl http://localhost:8081/123/callstart
curl http://localhost:8081/123/callend
"""
def _get_user_by_extension(extension, conn):
"""Find user and their assignment by phone extension."""
return conn.execute("""