Add 'invoked' parameter to Get method in controller

Updated the Get method in RecActionController to include a
new optional parameter, `invoked`, with a default value of
`false`. Updated XML documentation to reflect this change.

Modified the `ReadRecActionQuery` initialization to pass the
`invoked` parameter. Removed the previous method signature
that only accepted a `CancellationToken`.
This commit is contained in:
tekh 2025-12-04 15:17:38 +01:00
parent c41c394f48
commit 9d15dfe8a5

View File

@ -57,12 +57,14 @@ public class RecActionController(IMediator mediator, IConfiguration config) : Co
/// Gets all RecActions for a fake/test profile.
/// </summary>
/// <param name="cancel">A token to cancel the operation.</param>
/// <param name="invoked"></param>
/// <returns>A list of RecActions for the fake profile.</returns>
[HttpGet("fake")]
[ProducesResponseType(StatusCodes.Status200OK)]
public async Task<IActionResult> Get(CancellationToken cancel) => Ok(await mediator.Send(new ReadRecActionQuery()
public async Task<IActionResult> Get(CancellationToken cancel, bool invoked = false) => Ok(await mediator.Send(new ReadRecActionQuery()
{
ProfileId = config.GetFakeProfileId()
ProfileId = config.GetFakeProfileId(),
Invoked = invoked
}, cancel));
/// <summary>