Update invoked parameter binding in Get method

The `Get` method in the `RecActionController` class was updated to use the `[FromQuery]` attribute for the `invoked` parameter. This change ensures that the parameter value is explicitly bound from the query string of the HTTP request, improving clarity and alignment with expected usage.
This commit is contained in:
tekh 2025-12-04 15:25:50 +01:00
parent 9d15dfe8a5
commit 77fde199e1

View File

@ -61,7 +61,7 @@ public class RecActionController(IMediator mediator, IConfiguration config) : Co
/// <returns>A list of RecActions for the fake profile.</returns> /// <returns>A list of RecActions for the fake profile.</returns>
[HttpGet("fake")] [HttpGet("fake")]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
public async Task<IActionResult> Get(CancellationToken cancel, bool invoked = false) => Ok(await mediator.Send(new ReadRecActionQuery() public async Task<IActionResult> Get(CancellationToken cancel, [FromQuery] bool invoked = false) => Ok(await mediator.Send(new ReadRecActionQuery()
{ {
ProfileId = config.GetFakeProfileId(), ProfileId = config.GetFakeProfileId(),
Invoked = invoked Invoked = invoked