Mark RecAction commands and endpoints as obsolete
Added [Obsolete("Use the related procedure.")] to RecAction creation and deletion commands, handlers, mapping profile, and related controller endpoints to indicate deprecation. No functional changes were made.
This commit is contained in:
@@ -73,6 +73,7 @@ public class RecActionController(IMediator mediator, IConfiguration config) : Co
|
|||||||
/// <returns>An HTTP 201 Created response.</returns>
|
/// <returns>An HTTP 201 Created response.</returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[ProducesResponseType(StatusCodes.Status201Created)]
|
[ProducesResponseType(StatusCodes.Status201Created)]
|
||||||
|
[Obsolete("Use the related procedure.")]
|
||||||
public async Task<IActionResult> CreateAction([FromBody] CreateRecActionCommand command, CancellationToken cancel)
|
public async Task<IActionResult> CreateAction([FromBody] CreateRecActionCommand command, CancellationToken cancel)
|
||||||
{
|
{
|
||||||
await mediator.Send(command, cancel);
|
await mediator.Send(command, cancel);
|
||||||
@@ -91,6 +92,7 @@ public class RecActionController(IMediator mediator, IConfiguration config) : Co
|
|||||||
/// <returns>An HTTP 201 Created response.</returns>
|
/// <returns>An HTTP 201 Created response.</returns>
|
||||||
[HttpPost("fake")]
|
[HttpPost("fake")]
|
||||||
[ProducesResponseType(StatusCodes.Status201Created)]
|
[ProducesResponseType(StatusCodes.Status201Created)]
|
||||||
|
[Obsolete("Use the related procedure.")]
|
||||||
public async Task<IActionResult> CreateFakeAction(
|
public async Task<IActionResult> CreateFakeAction(
|
||||||
CancellationToken cancel,
|
CancellationToken cancel,
|
||||||
[FromBody] FakeRequest? request = null,
|
[FromBody] FakeRequest? request = null,
|
||||||
@@ -126,6 +128,7 @@ public class RecActionController(IMediator mediator, IConfiguration config) : Co
|
|||||||
/// <returns>An HTTP 204 No Content response upon successful deletion.</returns>
|
/// <returns>An HTTP 204 No Content response upon successful deletion.</returns>
|
||||||
[HttpDelete]
|
[HttpDelete]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
[Obsolete("Use the related procedure.")]
|
||||||
public async Task<IActionResult> Delete([FromQuery] DeleteRecActionsCommand cmd, CancellationToken cancel)
|
public async Task<IActionResult> Delete([FromQuery] DeleteRecActionsCommand cmd, CancellationToken cancel)
|
||||||
{
|
{
|
||||||
await mediator.Send(cmd, cancel);
|
await mediator.Send(cmd, cancel);
|
||||||
@@ -139,6 +142,7 @@ public class RecActionController(IMediator mediator, IConfiguration config) : Co
|
|||||||
/// <returns>An HTTP 204 No Content response upon successful deletion.</returns>
|
/// <returns>An HTTP 204 No Content response upon successful deletion.</returns>
|
||||||
[HttpDelete("fake")]
|
[HttpDelete("fake")]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
[Obsolete("Use the related procedure.")]
|
||||||
public async Task<IActionResult> Delete(CancellationToken cancel)
|
public async Task<IActionResult> Delete(CancellationToken cancel)
|
||||||
{
|
{
|
||||||
await mediator.Send(new DeleteRecActionsCommand()
|
await mediator.Send(new DeleteRecActionsCommand()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace ReC.Application.RecActionViews;
|
|||||||
// TODO: update to inject AddedWho from the current host/user contex
|
// TODO: update to inject AddedWho from the current host/user contex
|
||||||
public class MappingProfile : AutoMapper.Profile
|
public class MappingProfile : AutoMapper.Profile
|
||||||
{
|
{
|
||||||
|
[Obsolete("Use the related procedure.")]
|
||||||
public MappingProfile()
|
public MappingProfile()
|
||||||
{
|
{
|
||||||
CreateMap<CreateRecActionCommand, RecActionDto>()
|
CreateMap<CreateRecActionCommand, RecActionDto>()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using ReC.Application.Endpoints.Commands;
|
|||||||
|
|
||||||
namespace ReC.Application.RecActions.Commands;
|
namespace ReC.Application.RecActions.Commands;
|
||||||
|
|
||||||
|
[Obsolete("Use the related procedure.")]
|
||||||
public record CreateRecActionCommand : IRequest
|
public record CreateRecActionCommand : IRequest
|
||||||
{
|
{
|
||||||
public long ProfileId { get; init; }
|
public long ProfileId { get; init; }
|
||||||
@@ -27,6 +28,7 @@ public record CreateRecActionCommand : IRequest
|
|||||||
public long? EndpointAuthId { get; set; }
|
public long? EndpointAuthId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Use the related procedure.")]
|
||||||
public class CreateRecActionCommandHandler(ISender sender, IRepository<RecAction> repo) : IRequestHandler<CreateRecActionCommand>
|
public class CreateRecActionCommandHandler(ISender sender, IRepository<RecAction> repo) : IRequestHandler<CreateRecActionCommand>
|
||||||
{
|
{
|
||||||
public async Task Handle(CreateRecActionCommand request, CancellationToken cancel)
|
public async Task Handle(CreateRecActionCommand request, CancellationToken cancel)
|
||||||
|
|||||||
@@ -6,11 +6,13 @@ using ReC.Domain.Entities;
|
|||||||
|
|
||||||
namespace ReC.Application.RecActions.Commands;
|
namespace ReC.Application.RecActions.Commands;
|
||||||
|
|
||||||
|
[Obsolete("Use the related procedure.")]
|
||||||
public class DeleteRecActionsCommand : IRequest
|
public class DeleteRecActionsCommand : IRequest
|
||||||
{
|
{
|
||||||
public required long ProfileId { get; init; }
|
public required long ProfileId { get; init; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Use the related procedure.")]
|
||||||
public class DeleteRecActionsCommandHandler(IRepository<RecAction> repo) : IRequestHandler<DeleteRecActionsCommand>
|
public class DeleteRecActionsCommandHandler(IRepository<RecAction> repo) : IRequestHandler<DeleteRecActionsCommand>
|
||||||
{
|
{
|
||||||
public async Task Handle(DeleteRecActionsCommand request, CancellationToken cancel)
|
public async Task Handle(DeleteRecActionsCommand request, CancellationToken cancel)
|
||||||
|
|||||||
Reference in New Issue
Block a user