push even simpler
Some checks failed
Build and Publish / BuildAndDeploy (push) Successful in 3m13s
Build and Publish / BuildAndDeployAmd64 (push) Has been cancelled

This commit is contained in:
matst80
2025-04-18 16:56:06 +02:00
parent 0408524d41
commit 00e39cf7fa

10
main.go
View File

@@ -189,13 +189,11 @@ func main() {
}
var data OrderValidationBody
err := json.NewDecoder(r.Body).Decode(&data)
if err != nil {
log.Printf("Error decoding body: %v\n", err)
w.WriteHeader(http.StatusBadRequest)
return
if err == nil {
cartId := data.MerchantReference1
log.Printf("Received push for cart %s, status: %s", cartId, data.Status)
}
cartId := data.MerchantReference1
log.Printf("Received push for cart %s, status: %s", cartId, data.Status)
w.WriteHeader(http.StatusOK)
})
mux.HandleFunc("/version", func(w http.ResponseWriter, r *http.Request) {