Try parse sku from input line on Rhsolutions function apply
This commit is contained in:
parent
f267b27375
commit
c47301c0db
@ -17,9 +17,9 @@ namespace RhSolutions.Services
|
|||||||
{
|
{
|
||||||
string request = string.Empty;
|
string request = string.Empty;
|
||||||
|
|
||||||
if (line.IsRehauSku())
|
if (Sku.TryParse(line, out var skus))
|
||||||
{
|
{
|
||||||
request = @"https://rh.cebotari.ru/api/products/" + line;
|
request = @"https://rh.cebotari.ru/api/products/" + skus.FirstOrDefault().ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -42,14 +42,7 @@ namespace RhSolutions.Services
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (line.IsRehauSku())
|
return $"{product.ProductSku} {product.Name}";
|
||||||
{
|
|
||||||
return product.Name;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return $"{product.ProductSku} {product.Name}";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
Loading…
Reference in New Issue
Block a user