This commit is contained in:
Daniel Ledda
2020-11-04 19:01:11 +01:00
parent 42d372c860
commit 42dfd20eb9
2 changed files with 3 additions and 2 deletions

View File

@@ -52,6 +52,7 @@ func sendData(w http.ResponseWriter, r *http.Request) error {
if err != nil {
return fmt.Errorf("couldn't create a json from the records: %w", err)
}
w.Header().Set("Content-Type", "application/json")
_, err = fmt.Fprintf(w, string(json))
return err
}