Fix in method
This commit is contained in:
		| @@ -27,12 +27,11 @@ namespace Core.Inventory.Service.API.Controllers | ||||
|         private readonly IComponentHandler<GetFurnitureVariantsByIdsRequest> _getByIdsHandler = getByIdsHandler; | ||||
|         private readonly IFurnitureVariantPort _port = port; | ||||
|  | ||||
|         [HttpGet("GetAllByModelId")] | ||||
|         public async Task<IActionResult> GetAllAsync([FromQuery] string modelId, CancellationToken cancellationToken) | ||||
|         [HttpPost("GetAllByModelId")] | ||||
|         public async Task<IActionResult> 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; | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user