feat(api): add setup_complete system setting and status handlers

Add 'setup_complete' boolean to the system_settings seed data (defaults
to false) so fresh databases start in the unconfigured state.

Add two new handlers to SystemSettingsHandler:
- SetSetupComplete: marks setup_complete=true in the database
- GetSetupStatus: reads the current setup_complete value, returns
  {setup_complete: bool} JSON response, defaults to false if the
  setting row is missing or unparseable
This commit is contained in:
2026-06-06 00:03:52 -04:00
parent 307a43f6b0
commit cea8e64da2
2 changed files with 28 additions and 1 deletions
+2 -1
View File
@@ -49,7 +49,8 @@ CREATE TABLE IF NOT EXISTS system_settings (
INSERT INTO system_settings (setting_key, setting_value, description) VALUES
('scan_poll_interval_seconds', '60', 'How often to scan all libraries in minutes'),
('auto_scan_enabled', 'true', 'Whether auto-scanning is enabled system-wide'),
('default_timezone', 'UTC', 'System default timezone')
('default_timezone', 'UTC', 'System default timezone'),
('setup_complete', 'false', 'Whether the initial setup wizard has been completed')
ON CONFLICT (setting_key) DO NOTHING;
-- Create refresh_tokens table