diff --git a/src/ReC.API/Controllers/RecActionController.cs b/src/ReC.API/Controllers/RecActionController.cs index 8b67ef2..0ba1ed8 100644 --- a/src/ReC.API/Controllers/RecActionController.cs +++ b/src/ReC.API/Controllers/RecActionController.cs @@ -11,6 +11,8 @@ namespace ReC.API.Controllers; [ApiController] public class RecActionController(IMediator mediator) : ControllerBase { + private const long FakeProfileId = 2; + [HttpPost("invoke/{profileId}")] public async Task Invoke([FromRoute] int profileId, CancellationToken cancel) { @@ -25,6 +27,12 @@ public class RecActionController(IMediator mediator) : ControllerBase ProfileId = profileId }, cancel)); + [HttpGet("fake")] + public async Task Get(CancellationToken cancel) => Ok(await mediator.Send(new ReadRecActionQuery() + { + ProfileId = FakeProfileId + }, cancel)); + [HttpPost] public async Task CreateAction([FromBody] CreateRecActionCommand command, CancellationToken cancel) { @@ -49,7 +57,7 @@ public class RecActionController(IMediator mediator) : ControllerBase await mediator.Send(new CreateRecActionCommand() { - ProfileId = 2, + ProfileId = FakeProfileId, EndpointUri = endpointUri, Type = type, BodyQuery = $@"SELECT '{bodyJson ?? "NULL"}' AS REQUEST_BODY;", @@ -66,7 +74,7 @@ public class RecActionController(IMediator mediator) : ControllerBase { await mediator.Send(new DeleteRecActionsCommand() { - ProfileId = profileId + ProfileId = FakeProfileId }, cancel); return NoContent(); @@ -77,7 +85,7 @@ public class RecActionController(IMediator mediator) : ControllerBase { await mediator.Send(new DeleteRecActionsCommand() { - ProfileId = 2 + ProfileId = FakeProfileId }, cancel); return NoContent();