refactor(ReceiverSecretDto): remove
This commit is contained in:
parent
c59b179a8f
commit
7568274c77
@ -3,17 +3,12 @@ using EnvelopeGenerator.Application.Common.Dto.Receiver;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record EnvelopeReceiverDto : EnvelopeReceiverDto<ReceiverDto>;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record EnvelopeReceiverDto<TReceiverDto> where TReceiverDto : ReceiverDto
|
||||
public record EnvelopeReceiverDto
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
@ -23,7 +18,7 @@ public record EnvelopeReceiverDto<TReceiverDto> where TReceiverDto : ReceiverDto
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public TReceiverDto? Receiver { get; set; }
|
||||
public ReceiverDto? Receiver { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using EnvelopeGenerator.Application.Common.Dto.Receiver;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
|
||||
|
||||
@ -7,7 +6,7 @@ namespace EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
|
||||
///
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record EnvelopeReceiverSecretDto : EnvelopeReceiverDto<ReceiverSecretDto>
|
||||
public record EnvelopeReceiverSecretDto : EnvelopeReceiverDto
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
@ -34,7 +34,6 @@ public class MappingProfile : Profile
|
||||
CreateMap<Domain.Entities.EnvelopeReceiver, EnvelopeReceiverSecretDto>();
|
||||
CreateMap<EnvelopeType, EnvelopeTypeDto>();
|
||||
CreateMap<Domain.Entities.Receiver, ReceiverDto>();
|
||||
CreateMap<Domain.Entities.Receiver, ReceiverSecretDto>();
|
||||
CreateMap<Domain.Entities.EnvelopeReceiverReadOnly, EnvelopeReceiverReadOnlyDto>();
|
||||
|
||||
// DTO to Entity mappings
|
||||
|
||||
@ -25,6 +25,12 @@ public class ReceiverDto
|
||||
/// </summary>
|
||||
public required string Signature { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public string? TotpSecretkey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Dto.Receiver;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class ReceiverSecretDto : ReceiverDto
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? TotpSecretkey { get; set; }
|
||||
}
|
||||
@ -142,8 +142,7 @@ public class HomeController : ViewControllerBase
|
||||
}
|
||||
|
||||
[Obsolete("Use MediatR")]
|
||||
private async Task<IActionResult> CreateShowEnvelopeView<TReceiver>(string envelopeReceiverId, EnvelopeReceiverDto<TReceiver> er)
|
||||
where TReceiver : ReceiverDto
|
||||
private async Task<IActionResult> CreateShowEnvelopeView(string envelopeReceiverId, EnvelopeReceiverDto er)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@ -30,8 +30,7 @@ public static class WebExtensions
|
||||
return int.TryParse(env_id_str, out int env_id) ? env_id : null;
|
||||
}
|
||||
|
||||
public static async Task SignInEnvelopeAsync<TReceiver>(this HttpContext context, EnvelopeReceiverDto<TReceiver> er, string receiverRole)
|
||||
where TReceiver : ReceiverDto
|
||||
public static async Task SignInEnvelopeAsync(this HttpContext context, EnvelopeReceiverDto er, string receiverRole)
|
||||
{
|
||||
var claims = new List<Claim> {
|
||||
new(ClaimTypes.NameIdentifier, er.Envelope!.Uuid),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user