diff --git a/src/ReC.API/Controllers/OutResController.cs b/src/ReC.API/Controllers/OutResController.cs index 40e7955..a526c00 100644 --- a/src/ReC.API/Controllers/OutResController.cs +++ b/src/ReC.API/Controllers/OutResController.cs @@ -7,7 +7,6 @@ using ReC.Application.OutResults.Queries; namespace ReC.API.Controllers; -[Obsolete("This controller is deprecated and will be removed in future versions. Use the new ResultViewController instead.")] [Route("api/[controller]")] [ApiController] public class OutResController(IMediator mediator, IConfiguration config) : ControllerBase @@ -20,7 +19,7 @@ public class OutResController(IMediator mediator, IConfiguration config) : Contr /// A list of output results matching the query. [HttpGet] [ProducesResponseType(StatusCodes.Status200OK)] - public async Task Get([FromQuery] ReadOutResQuery query, CancellationToken cancel) => Ok(await mediator.Send(query, cancel)); + public async Task Get([FromQuery] ReadResultViewQuery query, CancellationToken cancel) => Ok(await mediator.Send(query, cancel)); /// /// Gets output results for a fake/test profile. @@ -29,8 +28,7 @@ public class OutResController(IMediator mediator, IConfiguration config) : Contr /// A list of output results for the fake profile. [HttpGet("fake")] [ProducesResponseType(StatusCodes.Status200OK)] - [Obsolete("Use the related procedure or view.")] - public async Task Get(CancellationToken cancel) => Ok(await mediator.Send(new ReadOutResQuery() + public async Task Get(CancellationToken cancel) => Ok(await mediator.Send(new ReadResultViewQuery() { ProfileId = config.GetFakeProfileId() }, cancel)); @@ -44,10 +42,9 @@ public class OutResController(IMediator mediator, IConfiguration config) : Contr /// The requested output result or a part of it (header/body). [HttpGet("fake/{actionId}")] [ProducesResponseType(StatusCodes.Status200OK)] - [Obsolete("Use the related procedure or view.")] public async Task Get([FromRoute] long actionId, CancellationToken cancel, ResultType resultType = ResultType.Full) { - var res = (await mediator.Send(new ReadOutResQuery() + var res = (await mediator.Send(new ReadResultViewQuery() { ProfileId = config.GetFakeProfileId(), ActionId = actionId @@ -69,6 +66,7 @@ public class OutResController(IMediator mediator, IConfiguration config) : Contr /// An empty response indicating success. [HttpDelete] [ProducesResponseType(StatusCodes.Status204NoContent)] + [Obsolete("Use the related procedure or view.")] public async Task Delete([FromQuery] DeleteOutResCommand command, CancellationToken cancel) { await mediator.Send(command, cancel); @@ -83,6 +81,7 @@ public class OutResController(IMediator mediator, IConfiguration config) : Contr [HttpDelete("fake")] [ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status400BadRequest)] + [Obsolete("Use the related procedure or view.")] public async Task Delete(CancellationToken cancel) { await mediator.Send(new DeleteOutResCommand() { ProfileId = config.GetFakeProfileId() }, cancel);