public async Task <IActionResult> Details(string orderId) { var order = await _ordersManagementAPI.GetOrderById(orderId); order.ImageString = ConvertAndFormatToString(order.ImageData); foreach (var detail in order.OrderDetails) { detail.ImageString = ConvertAndFormatToString(detail.FaceData); } return(View(order)); }
public async Task <OrderViewModel> GetOrderById(string id) { try { return(await _restClient.GetOrderById(id)); } catch (ApiException ex) { if (ex.StatusCode == HttpStatusCode.NotFound) { return(null); } else { throw ex; } } }