Sfoglia il codice sorgente

fix(go): mask only if set;

Vishal Dalwadi 2 mesi fa
parent
commit
1c20cf3682
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      controllers/server.go

+ 4 - 1
controllers/server.go

@@ -247,7 +247,10 @@ func getConfig(w http.ResponseWriter, r *http.Request) {
 // @Success     200 {object} config.ServerSettings
 func getSettings(w http.ResponseWriter, r *http.Request) {
 	scfg := logic.GetServerSettings()
-	scfg.ClientSecret = logic.Mask()
+	if scfg.ClientSecret != "" {
+		scfg.ClientSecret = logic.Mask()
+	}
+
 	logic.ReturnSuccessResponseWithJson(w, r, scfg, "fetched server settings successfully")
 }