Working
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user