(req dto.AgentBatchInstallReq)
| 661 | } |
| 662 | |
| 663 | func buildBatchInstallOpenclawAllowedOrigin(req dto.AgentBatchInstallReq) (string, error) { |
| 664 | host := "" |
| 665 | if value, err := settingRepo.GetValueByKey("SystemIP"); err == nil { |
| 666 | host = strings.TrimSpace(value) |
| 667 | } |
| 668 | if host == "" { |
| 669 | host = strings.TrimSpace(req.FallbackAccessHost) |
| 670 | } |
| 671 | if host == "" { |
| 672 | host = "127.0.0.1" |
| 673 | } |
| 674 | return buildOpenclawAllowedOrigin(openclawAllowedOriginScheme(req.AppVersion), host, req.WebUIPort) |
| 675 | } |
| 676 | |
| 677 | func (a AgentService) ensureBatchInstallAccount(req dto.AgentBatchInstallReq) (uint, error) { |
| 678 | if !requiresAgentAccount(req.AgentType) { |
no test coverage detected