asd
All checks were successful
Build and push image / deploy (push) Successful in 1m39s

This commit is contained in:
2023-12-28 19:39:43 +03:00
parent 2e39d4a554
commit 7acb7393a3
2 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -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()