Refactor envelope receiver command and response handling
- Updated `CreateEnvelopeReceiverCommand` to specify response type for `IRequest`. - Enhanced `CreateEnvelopeReceiverCommandHandler` to use `AutoMapper` and return `CreateEnvelopeReceiverResponse`. - Modified `Handle` method to map envelope data and populate recipient lists. - Changed `CreateEnvelopeReceiverResponse` to inherit from `CreateEnvelopeResponse` and added new properties. - Adjusted mapping profile to map `Envelope` to `CreateEnvelopeReceiverResponse`. - Created new mapping profile for `Receiver` to `ReceiverReadDto`.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using AutoMapper;
|
||||
using EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Envelopes.Commands;
|
||||
@@ -13,6 +14,6 @@ public class CreateEnvelopeMappingProfile : Profile
|
||||
/// </summary>
|
||||
public CreateEnvelopeMappingProfile()
|
||||
{
|
||||
CreateMap<Envelope, CreateEnvelopeResponse>();
|
||||
CreateMap<Envelope, CreateEnvelopeReceiverResponse>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user