mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-25 21:46:55 +08:00
fix(go): mask only if set;
This commit is contained in:
parent
0197de24f1
commit
1c20cf3682
1 changed files with 4 additions and 1 deletions
|
|
@ -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")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue