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<T> by removing the
entities dictionary conversion logic for virtual and non-virtual
entities.
This commit is contained in:
@@ -18,7 +18,7 @@ public class RecActionController(IMediator mediator, IConfiguration config) : Co
|
||||
/// <param name="profileId">The ID of the profile.</param>
|
||||
/// <param name="cancel">A token to cancel the operation.</param>
|
||||
/// <returns>An HTTP 202 Accepted response indicating the process has been started.</returns>
|
||||
[HttpPost("invoke/{cmd}")]
|
||||
[HttpPost("invoke")]
|
||||
[ProducesResponseType(StatusCodes.Status202Accepted)]
|
||||
public async Task<IActionResult> Invoke([FromRoute] int profileId, CancellationToken cancel)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,6 @@ public record DbModelOptions
|
||||
|
||||
public void EnsureEntity<T>(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);
|
||||
|
||||
Reference in New Issue
Block a user