update names
This commit is contained in:
@@ -59,14 +59,14 @@ func getItemData(sku string) (*messages.AddItem, error) {
|
|||||||
priceField, ok := item.GetFields()[4]
|
priceField, ok := item.GetFields()[4]
|
||||||
if ok {
|
if ok {
|
||||||
|
|
||||||
pricef, ok := priceField.(float64)
|
priceFloat, ok := priceField.(float64)
|
||||||
if !ok {
|
if !ok {
|
||||||
price, ok = priceField.(int)
|
price, ok = priceField.(int)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("invalid price type")
|
return nil, fmt.Errorf("invalid price type")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
price = int(pricef)
|
price = int(priceFloat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user