Fix empty response.

This commit is contained in:
Kyle Bostelmann 2016-10-05 20:30:47 -03:00
parent 3468c1a214
commit a87a0dcdad

View File

@ -521,12 +521,11 @@ func LoadConfig(w http.ResponseWriter, r *http.Request) {
if err := json.NewEncoder(w).Encode(resp); err != nil {
log.Printf("Error tailing logfile", err)
}
return
} else {
resp.Data = configContents
resp.Success = true
}
resp.Data = configContents
resp.Success = true
if err := json.NewEncoder(w).Encode(resp); err != nil {
log.Printf("Error encoding config file JSON reponse: ", err)
}