From f96b73bf389535e14e6f3cc5764b3c26796571f8 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 10 Dec 2025 16:02:41 +0100 Subject: [PATCH] Update RecAction route and refactor EnsureEntity logic Changed the RecActionController Invoke route to remove the {cmd} parameter, now accepting POST requests at "invoke" only. Refactored DbModelOptions.EnsureEntity by removing the entities dictionary conversion logic for virtual and non-virtual entities. --- src/ReC.API/Controllers/RecActionController.cs | 2 +- src/ReC.Infrastructure/Options/DbModelOptions.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ReC.API/Controllers/RecActionController.cs b/src/ReC.API/Controllers/RecActionController.cs index ff0d2b2..ca24e27 100644 --- a/src/ReC.API/Controllers/RecActionController.cs +++ b/src/ReC.API/Controllers/RecActionController.cs @@ -18,7 +18,7 @@ public class RecActionController(IMediator mediator, IConfiguration config) : Co /// The ID of the profile. /// A token to cancel the operation. /// An HTTP 202 Accepted response indicating the process has been started. - [HttpPost("invoke/{cmd}")] + [HttpPost("invoke")] [ProducesResponseType(StatusCodes.Status202Accepted)] public async Task Invoke([FromRoute] int profileId, CancellationToken cancel) { diff --git a/src/ReC.Infrastructure/Options/DbModelOptions.cs b/src/ReC.Infrastructure/Options/DbModelOptions.cs index 9e0445e..540d846 100644 --- a/src/ReC.Infrastructure/Options/DbModelOptions.cs +++ b/src/ReC.Infrastructure/Options/DbModelOptions.cs @@ -11,7 +11,6 @@ public record DbModelOptions public void EnsureEntity(bool isVirtual) { - var entities = isVirtual ? VirtualEntities.ToDictionary(kvp => kvp.Key, kvp => kvp.Value as EntityBaseOptions) : Entities.ToDictionary(kvp => kvp.Key, kvp => kvp.Value as EntityBaseOptions);