Replace CreateResultViewCommand with InsertResultProcedure
Updated ResultViewController to use InsertResultProcedure instead of CreateResultViewCommand. Changed import statements, method parameters, and response construction to reflect the new procedure type.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using ReC.API.Extensions;
|
using ReC.API.Extensions;
|
||||||
using ReC.API.Models;
|
using ReC.API.Models;
|
||||||
using ReC.Application.OutResults.Commands;
|
using ReC.Application.Common.Procedures.InsertProcedure;
|
||||||
using ReC.Application.OutResults.Queries;
|
using ReC.Application.OutResults.Queries;
|
||||||
|
|
||||||
namespace ReC.API.Controllers;
|
namespace ReC.API.Controllers;
|
||||||
@@ -41,9 +41,9 @@ public class ResultViewController(IMediator mediator, IConfiguration config) : C
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IActionResult> Create([FromBody] CreateResultViewCommand command, CancellationToken cancel)
|
public async Task<IActionResult> Create([FromBody] InsertResultProcedure procedure, CancellationToken cancel)
|
||||||
{
|
{
|
||||||
await mediator.Send(command, cancel);
|
await mediator.Send(procedure, cancel);
|
||||||
return CreatedAtAction(nameof(Get), new { actionId = command.ActionId }, command);
|
return CreatedAtAction(nameof(Get), new { actionId = procedure.ActionId }, procedure);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user