feat(workflow): 工作流提供方 - 集成 RunningHub 与 ComfyUI Bridge

This commit is contained in:
yepwait
2026-08-26 15:02:24 +08:00
committed by ddCat
parent 6141bd688c
commit 86fc3fda2f
82 changed files with 11405 additions and 248 deletions

View File

@@ -376,7 +376,7 @@ func (s *Service) protectTaskSecrets(value interface{}) error {
switch item := value.(type) {
case map[string]interface{}:
for key, child := range item {
if key == "apiKey" {
if isTaskSecretField(key) {
secret, _ := child.(string)
if secret != "" && secret != "system" && !strings.HasPrefix(secret, encryptedSettingPrefix) {
encrypted, err := s.encryptSettingSecret(secret)
@@ -420,7 +420,7 @@ func (s *Service) decryptTaskSecrets(value interface{}) error {
switch item := value.(type) {
case map[string]interface{}:
for key, child := range item {
if key == "apiKey" {
if isTaskSecretField(key) {
secret, _ := child.(string)
if strings.HasPrefix(secret, encryptedSettingPrefix) {
plain, err := s.decryptSettingSecret(secret)
@@ -445,6 +445,15 @@ func (s *Service) decryptTaskSecrets(value interface{}) error {
return nil
}
func isTaskSecretField(key string) bool {
switch key {
case "apiKey", "secretKey", "runningHubWalletApiKey", "runningHubUploadApiKey":
return true
default:
return false
}
}
func ossSettingFromRequest(req OSSSettingRequest, current ossSettingValue) (ossSettingValue, error) {
next := normalizeOSSSetting(ossSettingValue{
Enabled: req.Enabled,