feat: add settings API with key-value store

GET/PUT endpoints for app settings backed by a settings table.
This commit is contained in:
Fam Zheng
2026-03-04 11:46:58 +00:00
parent a3c9fbe8e5
commit c0b681adc3
2 changed files with 105 additions and 0 deletions

View File

@@ -199,6 +199,15 @@ impl Database {
.execute(&self.pool)
.await?;
sqlx::query(
"CREATE TABLE IF NOT EXISTS settings (
key TEXT PRIMARY KEY,
value TEXT NOT NULL
)"
)
.execute(&self.pool)
.await?;
Ok(())
}
}