feat: complete 2.0.7.12 platform overhaul
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user