Add [FromBody] to DTO params in controller actions

Explicitly annotate DTO parameters with [FromBody] in CatalogsController (Create, Update) and MassDataController (Upsert) to ensure correct model binding from the request body and improve API clarity.
This commit is contained in:
OlgunR
2026-04-21 15:22:33 +02:00
parent 087708dcf7
commit b35c167648
2 changed files with 3 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ public class MassDataController : ControllerBase
}
[HttpPost("upsert")]
public async Task<ActionResult<MassDataReadDto>> Upsert(MassDataWriteDto dto, CancellationToken cancellationToken)
public async Task<ActionResult<MassDataReadDto>> Upsert([FromBody]MassDataWriteDto dto, CancellationToken cancellationToken)
{
var result = await _mediator.Send(new UpsertMassDataByCustomerNameCommand(dto), cancellationToken);
return Ok(result);