From 95515935dc372d906285e29998354cde6490c448 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <1paneldev@sina.com> Date: Tue, 17 Mar 2026 14:47:50 +0800 Subject: [PATCH] fix: Fixed issue with build backend failed --- agent/app/service/agents.go | 4 ++-- agent/utils/xpack/community.go | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/agent/app/service/agents.go b/agent/app/service/agents.go index e47d0d7fcfef..a797181caaf4 100644 --- a/agent/app/service/agents.go +++ b/agent/app/service/agents.go @@ -27,7 +27,7 @@ import ( "github.com/1Panel-dev/1Panel/agent/utils/common" "github.com/1Panel-dev/1Panel/agent/utils/files" "github.com/1Panel-dev/1Panel/agent/utils/req_helper" - "github.com/1Panel-dev/1Panel/agent/xpack/xglobal" + "github.com/1Panel-dev/1Panel/agent/utils/xpack" ) type AgentService struct{} @@ -99,7 +99,7 @@ func (a AgentService) Create(req dto.AgentCreateReq) (*dto.AgentItem, error) { if installs, _ := appInstallRepo.ListBy(context.Background(), repo.WithByLowerName(req.Name)); len(installs) > 0 { return nil, buserr.New("ErrNameIsExist") } - if !xglobal.IsXpack { + if !xpack.IsXpack() { count, _, err := agentRepo.Page(1, 1) if err != nil { return nil, err diff --git a/agent/utils/xpack/community.go b/agent/utils/xpack/community.go index 826675348091..4d4f6f4a8220 100644 --- a/agent/utils/xpack/community.go +++ b/agent/utils/xpack/community.go @@ -39,6 +39,10 @@ func IsUseCustomApp() bool { return false } +func IsXpack() bool { + return false +} + func CreateTaskScanSMSAlertLog(alert dto.AlertDTO, alertType string, create dto.AlertLogCreate, pushAlert dto.PushAlert, method string) error { return nil }