fixed API and stopping delay

This commit is contained in:
Marco Mooren
2026-05-27 12:54:56 +02:00
parent 470d4e8e76
commit 7b8d78ddaf
22 changed files with 495 additions and 98 deletions

View File

@@ -158,3 +158,15 @@ CREATE TABLE IF NOT EXISTS room_state (
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
);
-- API keys for programmatic / script / StreamDeck access.
-- The actual key is shown only once at creation; only a SHA-256 hash is stored.
-- Send via: X-Api-Key: <key> or Authorization: Bearer <key>
CREATE TABLE IF NOT EXISTS api_keys (
id INTEGER PRIMARY KEY AUTOINCREMENT,
key_hash TEXT NOT NULL UNIQUE,
label TEXT NOT NULL DEFAULT '',
user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
last_used_at TEXT
);