diff --git a/backend/helpers/pluginhelper/api/ds_remote_api_proxy_api.go b/backend/helpers/pluginhelper/api/ds_remote_api_proxy_api.go index 9ea8b5d2a43..b0c4b0439c2 100644 --- a/backend/helpers/pluginhelper/api/ds_remote_api_proxy_api.go +++ b/backend/helpers/pluginhelper/api/ds_remote_api_proxy_api.go @@ -39,11 +39,7 @@ type DsRemoteApiProxyHelper[C plugin.ToolLayerApiConnection] struct { } // NewDsRemoteApiProxyHelper creates a new DsRemoteApiProxyHelper -func NewDsRemoteApiProxyHelper[ - C plugin.ToolLayerApiConnection, -]( - modelApiHelper *ModelApiHelper[C], -) *DsRemoteApiProxyHelper[C] { +func NewDsRemoteApiProxyHelper[C plugin.ToolLayerApiConnection](modelApiHelper *ModelApiHelper[C]) *DsRemoteApiProxyHelper[C] { return &DsRemoteApiProxyHelper[C]{ ModelApiHelper: modelApiHelper, logger: modelApiHelper.basicRes.GetLogger().Nested("remote_api_helper"), diff --git a/backend/plugins/zentao/models/connection.go b/backend/plugins/zentao/models/connection.go index 0554450e7ae..949dd36d2b4 100644 --- a/backend/plugins/zentao/models/connection.go +++ b/backend/plugins/zentao/models/connection.go @@ -73,6 +73,11 @@ type ZentaoConn struct { DbMaxConns int `json:"dbMaxConns" mapstructure:"dbMaxConns"` } +func (connection ZentaoConn) GetHash() string { + // zentao's token will expire after about 24min, so api client cannot be cached. + return "" +} + func (connection ZentaoConn) Sanitize() ZentaoConn { connection.Password = "" if connection.DbUrl != "" { @@ -106,6 +111,10 @@ func (connection ZentaoConn) SanitizeDbUrl() string { return dbUrl } +func (connection ZentaoConnection) GetHash() string { + return connection.ZentaoConn.GetHash() +} + func (connection ZentaoConnection) Sanitize() ZentaoConnection { connection.ZentaoConn = connection.ZentaoConn.Sanitize() return connection