Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
VP-5616: Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
trueboroda committed Oct 28, 2020
1 parent c39e782 commit 6e27e48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Task<ActionResult<AddItemsToCartResult>> AddItemsToCart([FromBody] AddCar
{
throw new ArgumentNullException(nameof(items));
}

async Task<ActionResult<AddItemsToCartResult>> InternalAddItemsToCart()
{
EnsureCartExists();
Expand Down Expand Up @@ -91,7 +91,7 @@ async Task<ActionResult<AddItemsToCartResult>> InternalAddItemsToCart()
};

return result;
}
}
}

return InternalAddItemsToCart();
Expand Down
2 changes: 1 addition & 1 deletion VirtoCommerce.Storefront/Domain/Cart/Demo/CartConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static ConfiguredGroup ToConfiguredGroup(this cartApiDto.DemoCartConfigur
{
var result = new ConfiguredGroup(group.Quantity ?? 0, cart.Currency, group.ProductId)
{
Id = group.Id,
Id = group.Id,
CreatedBy = group.CreatedBy,
CreatedDate = group.CreatedDate ?? DateTime.UtcNow,
ModifiedBy = group.ModifiedBy,
Expand Down
5 changes: 2 additions & 3 deletions VirtoCommerce.Storefront/Domain/Cart/Demo/DemoCartService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using VirtoCommerce.Storefront.Model;
using VirtoCommerce.Storefront.Model.Caching;
using VirtoCommerce.Storefront.Model.Cart;
using VirtoCommerce.Storefront.Model.Cart.Demo;
using VirtoCommerce.Storefront.Model.Catalog;
using VirtoCommerce.Storefront.Model.Catalog.Services;
using VirtoCommerce.Storefront.Model.Common;
Expand Down Expand Up @@ -82,7 +81,7 @@ async Task<IPagedList<ShoppingCart>> IntertallSearchCartsAsync()

protected virtual async Task FillProductPartsOfGroups(ShoppingCart cart, Language language, Currency currency)
{
if(cart.ConfiguredGroups.IsNullOrEmpty())
if (cart.ConfiguredGroups.IsNullOrEmpty())
{
return;
}
Expand All @@ -92,7 +91,7 @@ protected virtual async Task FillProductPartsOfGroups(ShoppingCart cart, Languag

foreach (var group in cart.ConfiguredGroups)
{
var product = groupProducts.FirstOrDefault(x=>x.Id.Equals(group.ProductId, StringComparison.InvariantCulture));
var product = groupProducts.FirstOrDefault(x => x.Id.Equals(group.ProductId, StringComparison.InvariantCulture));
group.Product = product;

var productParts = group.Items
Expand Down

0 comments on commit 6e27e48

Please sign in to comment.