From c00517f745a0f50d1573717297d2c07912421f8c Mon Sep 17 00:00:00 2001 From: Georg Spar Date: Sun, 25 Jun 2023 20:22:17 +0200 Subject: [PATCH] fix wdm.go --- wdm.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wdm.go b/wdm.go index e835488..575381a 100644 --- a/wdm.go +++ b/wdm.go @@ -799,9 +799,9 @@ func deleteItemExtHandler(writer http.ResponseWriter, req *http.Request) { writer.WriteHeader(http.StatusBadRequest) return } - itemBId, _ := strconv.ParseUint(mux.Vars(req)["id"], 10, 0) - log.Info("Deleting Typ with ID", itemBId) - _, err = DeleteItemB(uint64(itemBId)) + itemExtId, _ := strconv.ParseUint(mux.Vars(req)["id"], 10, 0) + log.Info("Deleting Typ with ID", itemExtId) + _, err = DeleteItemExt(uint64(itemExtId)) if err != nil { log.Fatal("Error: Delete could not be executed", err) } @@ -813,7 +813,7 @@ func showItemExtHandler(writer http.ResponseWriter, req *http.Request) { if req.Method == http.MethodOptions { return } - res, err := ShowItemB() + res, err := ShowItemExt() if err != nil { log.Fatal("Error: Typ can't be shown ", err) writer.WriteHeader(http.StatusInternalServerError) @@ -883,8 +883,8 @@ func updateItemExtHandler(writer http.ResponseWriter, req *http.Request) { if err != nil { writer.WriteHeader(http.StatusBadRequest) } - var itemB Itemb - json.Unmarshal(body, &itemB) + var itemExt ItemExt + json.Unmarshal(body, &itemExt) } log.Println("ID = ", itemExt.Id)