|
|
@ -5,7 +5,7 @@ import ( |
|
|
"encoding/json" |
|
|
"encoding/json" |
|
|
"fmt" |
|
|
"fmt" |
|
|
"html/template" |
|
|
"html/template" |
|
|
"io/ioutil" |
|
|
"io" |
|
|
"log" |
|
|
"log" |
|
|
"marmic/servicetrade-toolbox/internal/api" |
|
|
"marmic/servicetrade-toolbox/internal/api" |
|
|
"net/http" |
|
|
"net/http" |
|
|
@ -137,7 +137,7 @@ func VoidInvoiceHandler(w http.ResponseWriter, r *http.Request) { |
|
|
defer resp.Body.Close() |
|
|
defer resp.Body.Close() |
|
|
|
|
|
|
|
|
if resp.StatusCode != http.StatusOK { |
|
|
if resp.StatusCode != http.StatusOK { |
|
|
body, _ := ioutil.ReadAll(resp.Body) |
|
|
body, _ := io.ReadAll(resp.Body) |
|
|
log.Printf("Failed to void invoice: %s", body) |
|
|
log.Printf("Failed to void invoice: %s", body) |
|
|
http.Error(w, fmt.Sprintf("Failed to void invoice: %s", body), resp.StatusCode) |
|
|
http.Error(w, fmt.Sprintf("Failed to void invoice: %s", body), resp.StatusCode) |
|
|
return |
|
|
return |
|
|
|