Skip to content

Commit a87a0dc

Browse files
committed
Fix empty response.
1 parent 3468c1a commit a87a0dc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/handlers.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,12 +521,11 @@ func LoadConfig(w http.ResponseWriter, r *http.Request) {
521521
if err := json.NewEncoder(w).Encode(resp); err != nil {
522522
log.Printf("Error tailing logfile", err)
523523
}
524-
return
524+
} else {
525+
resp.Data = configContents
526+
resp.Success = true
525527
}
526528

527-
resp.Data = configContents
528-
resp.Success = true
529-
530529
if err := json.NewEncoder(w).Encode(resp); err != nil {
531530
log.Printf("Error encoding config file JSON reponse: ", err)
532531
}

0 commit comments

Comments
 (0)