Minor refactoring
This commit is contained in:
parent
289d15b79a
commit
46534d5688
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user