Browse Source

Fix OrderAppService.GetMyOrdersAsync

gterdem/swagger_update
Halil İbrahim Kalkan 4 years ago
parent
commit
00570116a2
  1. 5
      services/ordering/src/EShopOnAbp.OrderingService.Application/Orders/OrderAppService.cs

5
services/ordering/src/EShopOnAbp.OrderingService.Application/Orders/OrderAppService.cs

@ -40,6 +40,11 @@ public class OrderAppService : ApplicationService, IOrderAppService
[AllowAnonymous]
public async Task<List<OrderDto>> GetMyOrdersAsync(GetMyOrdersInput input)
{
if (CurrentUser.Id == null)
{
return new List<OrderDto>();
}
ISpecification<Order> specification = SpecificationFactory.Create(input.Filter);
var orders = await _orderRepository.GetOrdersByUserId(CurrentUser.GetId(), specification, true);
return CreateOrderDtoMapping(orders);

Loading…
Cancel
Save