write header before body

This commit is contained in:
Andre Medeiros 2021-08-14 20:19:45 -04:00
parent e746edfdb9
commit d4fad82264

View file

@ -27,6 +27,6 @@ const receiptResponse = `{
}`
func (a *api) checkReceiptHandler(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(receiptResponse))
w.WriteHeader(http.StatusOK)
w.Write([]byte(receiptResponse))
}