优化结构

This commit is contained in:
Yvan
2026-08-28 15:37:40 +08:00
parent a4ed3a02df
commit 9b1daaf3f6
17 changed files with 100 additions and 64 deletions
@@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
integrationbiz "kra/internal/biz/integration"
"kra/internal/config"
"kra/internal/service/dto"
)
@@ -76,7 +77,9 @@ func redactIntegrationJSON(raw json.RawMessage) json.RawMessage {
case map[string]any:
for k, item := range x {
if integrationbiz.IsIntegrationSecretKey(k) {
x[k] = "******"
if text, ok := item.(string); ok && text != "" {
x[k] = config.MaskedSecret
}
} else {
walk(item)
}