Minor refactoring

This commit is contained in:
CESARDL 2017-02-13 14:03:21 -08:00
parent 289d15b79a
commit 46534d5688

View File

@ -42,7 +42,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API.Controllers
[Route("new")] [Route("new")]
[HttpPost] [HttpPost]
public async Task<IActionResult> AddOrder([FromBody]CreateOrderCommand createOrderCommand) public async Task<IActionResult> CreateOrder([FromBody]CreateOrderCommand createOrderCommand)
{ {
if (createOrderCommand.CardTypeId == 0) if (createOrderCommand.CardTypeId == 0)
{ {
@ -51,8 +51,8 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API.Controllers
createOrderCommand.BuyerIdentityGuid = _identityService.GetUserIdentity(); createOrderCommand.BuyerIdentityGuid = _identityService.GetUserIdentity();
var added = await _mediator.SendAsync(createOrderCommand); var result = await _mediator.SendAsync(createOrderCommand);
if (added) if (result)
{ {
return Ok(); return Ok();
} }