()
| 85 | } |
| 86 | |
| 87 | func (c *Controller) loadAllOrganizations() { |
| 88 | orgs, err := c.store.ListOrganizations(c.ctx, params.OrganizationFilter{}) |
| 89 | if err != nil { |
| 90 | slog.ErrorContext(c.ctx, "fetching organizations", "error", err) |
| 91 | return |
| 92 | } |
| 93 | |
| 94 | for _, org := range orgs { |
| 95 | entity, err := org.GetEntity() |
| 96 | if err != nil { |
| 97 | slog.ErrorContext(c.ctx, "getting entity from organization", "error", err) |
| 98 | continue |
| 99 | } |
| 100 | c.storeEntityWorker(entity) |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | func (c *Controller) loadAllEnterprises() { |
| 105 | enterprises, err := c.store.ListEnterprises(c.ctx, params.EnterpriseFilter{}) |
no test coverage detected