diff --git a/Core.Inventory.Service.API/Controllers/FurnitureVariantController.cs b/Core.Inventory.Service.API/Controllers/FurnitureVariantController.cs index 458df20..619026a 100644 --- a/Core.Inventory.Service.API/Controllers/FurnitureVariantController.cs +++ b/Core.Inventory.Service.API/Controllers/FurnitureVariantController.cs @@ -27,12 +27,11 @@ namespace Core.Inventory.Service.API.Controllers private readonly IComponentHandler _getByIdsHandler = getByIdsHandler; private readonly IFurnitureVariantPort _port = port; - [HttpGet("GetAllByModelId")] - public async Task GetAllAsync([FromQuery] string modelId, CancellationToken cancellationToken) + [HttpPost("GetAllByModelId")] + public async Task GetAllAsync([FromBody] GetAllFurnitureVariantsByModelIdRequest request, CancellationToken cancellationToken) { - if (string.IsNullOrEmpty(modelId)) return BadRequest("Model ID is required"); + if (string.IsNullOrEmpty(request?.ModelId)) return BadRequest("Model ID is required"); - var request = new GetAllFurnitureVariantsByModelIdRequest { ModelId = modelId }; await _getAllHandler.ExecuteAsync(request, cancellationToken).ConfigureAwait(false); return _port.ViewModel; }