ultisuite-backend/internal/api/admin/org_search_secrets.go
R3D347HR4Y 621b0099d6
Some checks are pending
CI / Go tests (push) Waiting to run
CI / Integration tests (push) Waiting to run
CI / DB migrations (push) Waiting to run
feat(deploy): enhance Nginx configuration and API integration for UltiAI
- Updated .env.example to include new configuration options for the UltiAI branding and API endpoints.
- Enhanced Nginx configuration to support new API routes for the MCP and WebSocket connections.
- Introduced sub-filters for branding adjustments in Nginx responses.
- Added new JavaScript patch for API endpoint adjustments.
- Implemented tests for new API functionalities and improved error handling in the AI gateway.
2026-06-15 00:22:23 +02:00

38 lines
733 B
Go

package admin
import "strings"
func buildWebSearchProviderSecretsStatus(policy map[string]any) map[string]any {
searchSection, ok := policy["search"].(map[string]any)
if !ok {
return nil
}
webSearch, ok := searchSection["web_search"].(map[string]any)
if !ok {
return nil
}
providers, ok := webSearch["providers"].([]any)
if !ok {
return nil
}
out := map[string]any{}
for _, item := range providers {
pm, ok := item.(map[string]any)
if !ok {
continue
}
id, _ := pm["id"].(string)
if strings.TrimSpace(id) == "" {
continue
}
apiKey, _ := pm["api_key"].(string)
out[id] = map[string]any{
"configured": strings.TrimSpace(apiKey) != "",
}
}
if len(out) == 0 {
return nil
}
return out
}