feat: Preload Locations and Certificate for proxy hosts in ApplyConfig
This commit is contained in:
@@ -37,7 +37,7 @@ func NewManager(client *Client, db *gorm.DB, configDir string, frontendDir strin
|
||||
func (m *Manager) ApplyConfig(ctx context.Context) error {
|
||||
// Fetch all proxy hosts from database
|
||||
var hosts []models.ProxyHost
|
||||
if err := m.db.Find(&hosts).Error; err != nil {
|
||||
if err := m.db.Preload("Locations").Preload("Certificate").Find(&hosts).Error; err != nil {
|
||||
return fmt.Errorf("fetch proxy hosts: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user