diff --git a/cmd/cli/plati.go b/cmd/cli/plati.go index 243a268..354cea3 100644 --- a/cmd/cli/plati.go +++ b/cmd/cli/plati.go @@ -49,6 +49,7 @@ var platiCommand = &cli.Command{ log.Printf("fetching goods [%d/%d] for %s\n", l, len(categories), c.FlatName) goods, err := platiCli.GetBlockGoodsCategory(ctx, cat.ID, cat.ParentID, "cntSellDESC", 1, 100, "RUR", "ru-RU") if err != nil { + log.Printf("error: %v", err) return fmt.Errorf("getblockgoodscategory: %w", err) } if len(goods) == 0 { @@ -58,6 +59,7 @@ var platiCommand = &cli.Command{ gormGoods := convertGoodsToGorm(cat, goods) if err := db.Create(gormGoods).Error; err != nil { + log.Printf("error: %v", err) return fmt.Errorf("db Create: %w", err) } json.NewEncoder(os.Stdout).Encode(goods) diff --git a/plati/goodscategory.go b/plati/goodscategory.go index 692c56a..9f4274c 100644 --- a/plati/goodscategory.go +++ b/plati/goodscategory.go @@ -126,8 +126,8 @@ func (c *Client) GetBlockGoodsCategory(ctx context.Context, idC int, idR int, so return nil, fmt.Errorf("http do: %w", err) } - dump, err = httputil.DumpResponse(resp, true) - log.Printf("%d %s", resp.StatusCode, string(dump)) + // dump, err = httputil.DumpResponse(resp, true) + // log.Printf("%d %s", resp.StatusCode, string(dump)) defer resp.Body.Close()