private async Task <Order> GetOrder(int orderId, string token) { try { return(await customerOrderService.GetOrder(orderId, token)); } catch (Exception ex) { logger.LogError(ex.Message); throw; } }
public async Task <IActionResult> Get(OrderRequest orderRequest) { var customer = await _customerDetailsApiClient.GetCustomer(orderRequest.User); if (customer == null || string.IsNullOrWhiteSpace(customer.CustomerId)) { return(BadRequest("Invalid Request!")); } var customerOrder = _customerOrderService.GetOrder(customer); return(Ok(customerOrder)); }