From e2427319fda2929aad747bb727140d320f661c1d Mon Sep 17 00:00:00 2001 From: andig Date: Sat, 5 Apr 2025 11:20:06 +0200 Subject: [PATCH] Revert "chore: simplify" This reverts commit f745ecf4136afa69ba1ed284be2047148e5dde52. --- api/globalconfig/types.go | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/api/globalconfig/types.go b/api/globalconfig/types.go index 5039e4df2..5752833ee 100644 --- a/api/globalconfig/types.go +++ b/api/globalconfig/types.go @@ -86,7 +86,10 @@ type Mqtt struct { // Redacted implements the redactor interface used by the tee publisher func (m Mqtt) Redacted() any { - return Mqtt{ + return struct { + mqtt.Config + Topic string `json:"topic"` + }{ m.Config.Redacted(), m.Topic, } @@ -105,14 +108,22 @@ type Influx struct { // Redacted implements the redactor interface used by the tee publisher func (c Influx) Redacted() any { - return Influx{ + return struct { + URL string `json:"url"` + Database string `json:"database"` + Org string `json:"org"` + User string `json:"user"` + Insecure bool `json:"insecure"` + Password string `json:"password,omitempty"` + Token string `json:"token,omitempty"` + }{ URL: c.URL, Database: c.Database, - Token: masked(c.Token), Org: c.Org, User: c.User, - Password: masked(c.Password), Insecure: c.Insecure, + Password: masked(c.Password), + Token: masked(c.Token), } }