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:
+15
@@ -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("""
|
||||
|
||||
Reference in New Issue
Block a user