diff --git a/controllers/ParseController.go b/controllers/ParseController.go index 3ca31f2..2e925c5 100644 --- a/controllers/ParseController.go +++ b/controllers/ParseController.go @@ -79,9 +79,9 @@ func ParseLinkTY(link string,w http.ResponseWriter) { product, err := linkParser.ParseLink() - jsProd,_:= json.MarshalIndent(product,""," ") - - fmt.Println(string(jsProd)) + //jsProd,_:= json.MarshalIndent(product,""," ") + // + //fmt.Println(string(jsProd)) if err != nil { w.WriteHeader(http.StatusInternalServerError) diff --git a/repositories/ParseRepository.go b/repositories/ParseRepository.go index dd0e372..680d4b6 100644 --- a/repositories/ParseRepository.go +++ b/repositories/ParseRepository.go @@ -296,9 +296,9 @@ func CreateJSONFromModel(model models.TrendyolProductDetailModel) map[string]int for i := 0; i < len(model.AlternativeVariants); i++ { alternativeVariant := model.AlternativeVariants[i] - stockType := reflect.TypeOf(alternativeVariant.Stock) + //stockType := reflect.TypeOf(alternativeVariant.Stock) - if stockType == nil && len(variants) > 0 { + if len(variants) > 0 { // get the first variant for attribute info fv := variants[0]