diff --git a/src/ReC.API/Controllers/RecActionController.cs b/src/ReC.API/Controllers/RecActionController.cs index 524c886..9f90ce0 100644 --- a/src/ReC.API/Controllers/RecActionController.cs +++ b/src/ReC.API/Controllers/RecActionController.cs @@ -11,19 +11,20 @@ namespace ReC.API.Controllers; [ApiController] public class RecActionController(IMediator mediator) : ControllerBase { - [HttpGet] - public async Task Get([FromQuery] long profileId, CancellationToken cancel) => Ok(await mediator.Send(new ReadRecActionQuery() - { - ProfileId = profileId - }, cancel)); - - [HttpPost("{profileId}")] + [HttpPost("invoke/{profileId}")] public async Task Invoke([FromRoute] int profileId, CancellationToken cancel) { await mediator.InvokeBatchRecAction(profileId, cancel); return Accepted(); } + #region CRUD + [HttpGet] + public async Task Get([FromQuery] long profileId, CancellationToken cancel) => Ok(await mediator.Send(new ReadRecActionQuery() + { + ProfileId = profileId + }, cancel)); + [HttpPost] public async Task CreateAction([FromBody] CreateRecActionCommand command, CancellationToken cancel) { @@ -60,7 +61,7 @@ public class RecActionController(IMediator mediator) : ControllerBase } [HttpDelete] - public async Task GetActions([FromQuery] int profileId, CancellationToken cancel) + public async Task Delete([FromQuery] int profileId, CancellationToken cancel) { await mediator.Send(new DeleteRecActionsCommand() { @@ -69,4 +70,5 @@ public class RecActionController(IMediator mediator) : ControllerBase return NoContent(); } + #endregion CRUD } \ No newline at end of file