feat: add JSON API with token auth (closes #69) #74

Merged
sneak merged 5 commits from feature/json-api into main 2026-02-16 09:51:48 +01:00
2 changed files with 0 additions and 12 deletions
Showing only changes of commit 8d68a31366 - Show all commits

View File

@ -1,11 +0,0 @@
CREATE TABLE IF NOT EXISTS api_tokens (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
name TEXT NOT NULL DEFAULT '',
token_hash TEXT NOT NULL UNIQUE,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
last_used_at DATETIME
);
CREATE INDEX IF NOT EXISTS idx_api_tokens_token_hash ON api_tokens(token_hash);
CREATE INDEX IF NOT EXISTS idx_api_tokens_user_id ON api_tokens(user_id);

View File

@ -1 +0,0 @@
DROP TABLE IF EXISTS api_tokens;