feat: complete 2.0.7.12 platform overhaul

This commit is contained in:
2026-08-16 19:33:03 +08:00
parent 73555cd04c
commit c9fa6f7a88
159 changed files with 13243 additions and 2539 deletions
@@ -77,20 +77,16 @@ func NewService(store *db.Store) *Service {
}
}
func (s *Service) Bootstrap(ctx context.Context) (map[string]any, error) {
func (s *Service) Bootstrap(ctx context.Context, includeSecurityState bool) (map[string]any, error) {
payload := map[string]any{"ok": true}
if !includeSecurityState {
return payload, nil
}
isDefault, err := s.store.IsDefaultAdminPassword(ctx)
if err != nil {
return nil, err
}
payload := map[string]any{
"ok": true,
"defaultUsername": "admin",
"defaultPassword": "",
"isDefaultPassword": isDefault,
}
if isDefault {
payload["defaultPassword"] = "admin"
}
payload["isDefaultPassword"] = isDefault
return payload, nil
}