Refactor: Rename DeleteEndpointAuthProcedure to Command
Renamed DeleteEndpointAuthProcedure to DeleteEndpointAuthCommand across the codebase, including controller, handler, and tests, to improve naming consistency and align with CQRS conventions for write operations.
This commit is contained in:
@@ -44,7 +44,7 @@ public class EndpointAuthController(IMediator mediator, IConfiguration config) :
|
||||
/// <returns>No content on success.</returns>
|
||||
[HttpDelete]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
public async Task<IActionResult> Delete([FromBody] DeleteEndpointAuthProcedure procedure, CancellationToken cancel)
|
||||
public async Task<IActionResult> Delete([FromBody] DeleteEndpointAuthCommand procedure, CancellationToken cancel)
|
||||
{
|
||||
await mediator.Send(procedure, cancel);
|
||||
return NoContent();
|
||||
|
||||
@@ -3,7 +3,7 @@ using ReC.Application.Common.Procedures.DeleteProcedure;
|
||||
|
||||
namespace ReC.Application.EndpointAuth.Commands;
|
||||
|
||||
public record DeleteEndpointAuthProcedure : IDeleteProcedure
|
||||
public record DeleteEndpointAuthCommand : IDeleteProcedure
|
||||
{
|
||||
/// <summary>
|
||||
/// Start GUID/ID (inclusive)
|
||||
@@ -21,9 +21,9 @@ public record DeleteEndpointAuthProcedure : IDeleteProcedure
|
||||
public bool Force { get; set; }
|
||||
}
|
||||
|
||||
public class DeleteEndpointAuthProcedureHandler(ISender sender) : IRequestHandler<DeleteEndpointAuthProcedure, int>
|
||||
public class DeleteEndpointAuthProcedureHandler(ISender sender) : IRequestHandler<DeleteEndpointAuthCommand, int>
|
||||
{
|
||||
public async Task<int> Handle(DeleteEndpointAuthProcedure request, CancellationToken cancel)
|
||||
public async Task<int> Handle(DeleteEndpointAuthCommand request, CancellationToken cancel)
|
||||
{
|
||||
return await sender.Send(new DeleteObjectProcedure
|
||||
{
|
||||
Reference in New Issue
Block a user