Refactor: Rename UpdateEndpointAuthProcedure to Command

Renamed UpdateEndpointAuthProcedure to UpdateEndpointAuthCommand across the codebase for improved naming consistency. Updated controller, handler, and tests to use the new command name, aligning with CQRS conventions for state-modifying operations.
This commit is contained in:
2026-03-24 11:36:49 +01:00
parent a6b0cbaf9d
commit d3d24a0fb6
3 changed files with 5 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
using MediatR;
using ReC.Application.Common.Procedures.UpdateProcedure;
using ReC.Application.Common.Procedures.UpdateProcedure.Dto;
namespace ReC.Application.EndpointAuth.Commands;
public record UpdateEndpointAuthCommand : IUpdateProcedure<UpdateEndpointAuthDto>
{
public long Id { get; set; }
public UpdateEndpointAuthDto Data { get; set; } = null!;
}
public class UpdateEndpointAuthProcedureHandler(ISender sender) : IRequestHandler<UpdateEndpointAuthCommand, int>
{
public async Task<int> Handle(UpdateEndpointAuthCommand request, CancellationToken cancel)
{
return await sender.Send(new UpdateObjectProcedure
{
Entity = "ENDPOINT_AUTH",
Id = request.Id,
EndpointAuth = request.Data
}, cancel);
}
}