Rename InsertEndpointAuthProcedure to InsertEndpointAuthCommand

Refactored all usages of InsertEndpointAuthProcedure to InsertEndpointAuthCommand, including method signatures, handler interfaces, and test cases, to better align with CQRS naming conventions for write operations.
This commit is contained in:
2026-03-24 11:35:58 +01:00
parent 0162d059da
commit a6b0cbaf9d
4 changed files with 6 additions and 6 deletions

View File

@@ -0,0 +1,31 @@
using MediatR;
using ReC.Application.Common.Procedures.InsertProcedure;
namespace ReC.Application.EndpointAuth.Commands;
public record InsertEndpointAuthCommand : IInsertProcedure
{
public bool? Active { get; set; }
public string? Description { get; set; }
public byte? TypeId { get; set; }
public string? ApiKey { get; set; }
public string? ApiValue { get; set; }
public bool? ApiKeyAddToId { get; set; }
public string? Token { get; set; }
public string? Username { get; set; }
public string? Password { get; set; }
public string? Domain { get; set; }
public string? Workstation { get; set; }
}
public class InsertEndpointAuthProcedureHandler(ISender sender) : IRequestHandler<InsertEndpointAuthCommand, long>
{
public async Task<long> Handle(InsertEndpointAuthCommand request, CancellationToken cancel)
{
return await sender.Send(new InsertObjectProcedure
{
Entity = "ENDPOINT_AUTH",
EndpointAuth = request
}, cancel);
}
}