Mark fake OutRes endpoints and queries as [Obsolete]
Added [Obsolete] attribute to "fake" Get methods in OutResController, as well as to ReadOutResQuery, ReadOutResHandler, and ReadOutResQueryValidator. These components are now deprecated in favor of related procedures or views. No functional changes were made.
This commit is contained in:
@@ -29,6 +29,7 @@ public class OutResController(IMediator mediator, IConfiguration config) : Contr
|
||||
/// <returns>A list of output results for the fake profile.</returns>
|
||||
[HttpGet("fake")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[Obsolete("Use the related procedure or view.")]
|
||||
public async Task<IActionResult> Get(CancellationToken cancel) => Ok(await mediator.Send(new ReadOutResQuery()
|
||||
{
|
||||
ProfileId = config.GetFakeProfileId()
|
||||
@@ -43,6 +44,7 @@ public class OutResController(IMediator mediator, IConfiguration config) : Contr
|
||||
/// <returns>The requested output result or a part of it (header/body).</returns>
|
||||
[HttpGet("fake/{actionId}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[Obsolete("Use the related procedure or view.")]
|
||||
public async Task<IActionResult> Get([FromRoute] long actionId, CancellationToken cancel, ResultType resultType = ResultType.Full)
|
||||
{
|
||||
var res = (await mediator.Send(new ReadOutResQuery()
|
||||
|
||||
@@ -8,6 +8,7 @@ using ReC.Domain.Entities;
|
||||
|
||||
namespace ReC.Application.OutResults.Queries;
|
||||
|
||||
[Obsolete("Use the related procedure or view.")]
|
||||
public record ReadOutResQuery : IRequest<IEnumerable<OutResDto>>
|
||||
{
|
||||
public long? ProfileId { get; init; }
|
||||
@@ -15,6 +16,7 @@ public record ReadOutResQuery : IRequest<IEnumerable<OutResDto>>
|
||||
public long? ActionId { get; init; }
|
||||
}
|
||||
|
||||
[Obsolete("Use the related procedure or view.")]
|
||||
public class ReadOutResHandler(IRepository<OutRes> repo, IMapper mapper) : IRequestHandler<ReadOutResQuery, IEnumerable<OutResDto>>
|
||||
{
|
||||
public async Task<IEnumerable<OutResDto>> Handle(ReadOutResQuery request, CancellationToken cancel)
|
||||
|
||||
@@ -2,6 +2,7 @@ using FluentValidation;
|
||||
|
||||
namespace ReC.Application.OutResults.Queries;
|
||||
|
||||
[Obsolete("Use the related procedure or view.")]
|
||||
public class ReadOutResQueryValidator : AbstractValidator<ReadOutResQuery>
|
||||
{
|
||||
public ReadOutResQueryValidator()
|
||||
|
||||
Reference in New Issue
Block a user