This commit is contained in:
2026-04-18 22:36:21 +04:30
parent 49591985ac
commit c64c3dd9be
20 changed files with 157 additions and 24 deletions
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using Vizhvizh.BuildingBlocks.Infrastructure;
using Vizhvizh.Shop.ApplicationContract.Commands;
using Vizhvizh.Shop.ApplicationContract.DTOs;
using Vizhvizh.Shop.ApplicationContract.Queries;
@@ -13,6 +14,11 @@ namespace Vizhvizh.Shop.Api.Controllers
public async Task<ActionResult<ShopDTO?>> GetById([FromQuery] long shopId, CancellationToken cancellationToken)
=> Ok(await executor.Execute(new GetShopByIdQuery(shopId), cancellationToken));
[HttpPost]
public async Task<ActionResult> Create([FromBody] CreateShopCommand request, CancellationToken cancellationToken)
{
await executor.Execute(request, cancellationToken);
return Ok();
}
}
}