diff --git a/src/Services/Ordering/Ordering.API/Controllers/OrderingController.cs b/src/Services/Ordering/Ordering.API/Controllers/OrderingController.cs index 0f5c7ffa5..6b9c4b2f2 100644 --- a/src/Services/Ordering/Ordering.API/Controllers/OrderingController.cs +++ b/src/Services/Ordering/Ordering.API/Controllers/OrderingController.cs @@ -58,26 +58,29 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API.Controllers // POST api/ordering/orders/create [HttpPut("orders/create")] - public async Task Post([FromBody]Order order) + public async Task Post([FromBody]Order order) { _orderRepository.Add(order); - return await _orderRepository.UnitOfWork.CommitAsync(); + int numChanges = await _orderRepository.UnitOfWork.CommitAsync(); + return Ok(numChanges); } // PUT api/ordering/orders/xxxOrderGUIDxxxx/update [HttpPut("orders/{orderId:Guid}/update")] - public async Task UpdateOrder(Guid orderID, [FromBody] Order orderToUpdate) + public async Task UpdateOrder(Guid orderID, [FromBody] Order orderToUpdate) { _orderRepository.Update(orderToUpdate); - return await _orderRepository.UnitOfWork.CommitAsync(); + int numChanges = await _orderRepository.UnitOfWork.CommitAsync(); + return Ok(numChanges); } // DELETE api/ordering/orders/xxxOrderGUIDxxxx [HttpDelete("orders/{orderId:Guid}/remove")] - public async Task Remove(Guid id) + public async Task Remove(Guid id) { await _orderRepository.Remove(id); - return await _orderRepository.UnitOfWork.CommitAsync(); + int numChanges = await _orderRepository.UnitOfWork.CommitAsync(); + return Ok(numChanges); } diff --git a/src/Services/Ordering/Ordering.API/docker-compose.debug.yml b/src/Services/Ordering/Ordering.API/docker-compose.debug.yml index c35be90c1..737145169 100644 --- a/src/Services/Ordering/Ordering.API/docker-compose.debug.yml +++ b/src/Services/Ordering/Ordering.API/docker-compose.debug.yml @@ -12,3 +12,5 @@ services: - "80:80" volumes: - .:/app + extra_hosts: + - "CESARDLBOOKVHD:10.0.75.1" \ No newline at end of file diff --git a/src/Services/Ordering/Ordering.API/docker-compose.yml b/src/Services/Ordering/Ordering.API/docker-compose.yml index c52ef09e9..288e759c6 100644 --- a/src/Services/Ordering/Ordering.API/docker-compose.yml +++ b/src/Services/Ordering/Ordering.API/docker-compose.yml @@ -8,3 +8,5 @@ services: dockerfile: Dockerfile ports: - "80:80" + extra_hosts: + - "CESARDLBOOKVHD:10.0.75.1" \ No newline at end of file