()
| 44 | } |
| 45 | |
| 46 | func (m dashboardModel) fetchData() tea.Msg { |
| 47 | cfg, cfgErr := m.client.GetConfig() |
| 48 | authFiles, authErr := m.client.GetAuthFiles() |
| 49 | apiKeys, keysErr := m.client.GetAPIKeys() |
| 50 | |
| 51 | var err error |
| 52 | for _, e := range []error{cfgErr, authErr, keysErr} { |
| 53 | if e != nil { |
| 54 | err = e |
| 55 | break |
| 56 | } |
| 57 | } |
| 58 | return dashboardDataMsg{config: cfg, authFiles: authFiles, apiKeys: apiKeys, err: err} |
| 59 | } |
| 60 | |
| 61 | func (m dashboardModel) Update(msg tea.Msg) (dashboardModel, tea.Cmd) { |
| 62 | switch msg := msg.(type) { |
nothing calls this directly
no test coverage detected