diff --git a/controllers/ParseController.go b/controllers/ParseController.go index 3ca31f2..d35bb6a 100644 --- a/controllers/ParseController.go +++ b/controllers/ParseController.go @@ -79,10 +79,6 @@ func ParseLinkTY(link string,w http.ResponseWriter) { product, err := linkParser.ParseLink() - jsProd,_:= json.MarshalIndent(product,""," ") - - fmt.Println(string(jsProd)) - if err != nil { w.WriteHeader(http.StatusInternalServerError) json.NewEncoder(w).Encode(map[string]string{ @@ -94,6 +90,10 @@ func ParseLinkTY(link string,w http.ResponseWriter) { jsonProduct, err := linkParser.GetProductDetailWithOptions(product.ID, product.ProductGroupID) + jsProd,_:= json.MarshalIndent(jsonProduct,""," ") + + fmt.Println(string(jsProd)) + if err != nil { helper.Error(err) return