|
|
@ -116,9 +116,14 @@ func deleteTypHandler(writer http.ResponseWriter, req *http.Request) { |
|
|
|
if req.Method == http.MethodOptions { |
|
|
|
if req.Method == http.MethodOptions { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
err := req.ParseMultipartForm(64 << 20) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
writer.WriteHeader(http.StatusBadRequest) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
typId, _ := strconv.ParseUint(mux.Vars(req)["id"], 10, 0) |
|
|
|
typId, _ := strconv.ParseUint(mux.Vars(req)["id"], 10, 0) |
|
|
|
log.Info("Deleting Instance with ID", typId) |
|
|
|
log.Info("Deleting Instance with ID", typId) |
|
|
|
_, err := DeleteTyp(uint(typId)) |
|
|
|
_, err = DeleteTyp(uint(typId)) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
log.Fatal("Error: Delete could not be executed", err) |
|
|
|
log.Fatal("Error: Delete could not be executed", err) |
|
|
|
} |
|
|
|
} |
|
|
|