Browse Source

Replaced ternary operator with switch

pull/1756/head
veysel mutlu 3 years ago
parent
commit
79d81f531a
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs

+ 6
- 3
src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs View File

@ -6,9 +6,12 @@
{
if (item != null)
{
item.PictureUri = azureStorageEnabled
? picBaseUrl + item.PictureFileName
: picBaseUrl.Replace("[0]", item.Id.ToString());
// https://www.linkedin.com/feed/update/urn:li:activity:6841055191211491328/
item.PictureUri = azureStorageEnabled switch
{
true => picBaseUrl + item.PictureFileName,
_ => picBaseUrl.Replace("[0]", item.Id.ToString())
};
}
}
}


Loading…
Cancel
Save