This commit is contained in:
f41gh7 2021-03-15 23:03:52 +03:00 committed by Aliaksandr Valialkin
parent e2717d84c0
commit b7c9f3676e

View file

@ -23,7 +23,7 @@ func WriteDatabaseNames(w http.ResponseWriter) {
}
dbs := make([]string, len(dbNames))
for i := range dbNames {
dbs[i] = fmt.Sprintf(`"[%s]"`, dbNames[i])
dbs[i] = fmt.Sprintf(`[%q]`, dbNames[i])
}
fmt.Fprintf(w, `{"results":[{"name":"databases","columns":["name"],"series":[{"values":[%s]}]}]}`, strings.Join(dbs, ","))
}