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