fix(go): mask only if set;

This commit is contained in:
Vishal Dalwadi
2025-06-19 21:53:52 +05:30
parent 0197de24f1
commit 1c20cf3682

View File

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