feat(application): register AutoMapper mappings for new commands and add SendAndAppend to IImapEmailService

This commit is contained in:
2026-08-17 10:15:13 +02:00
parent f7e95eb7f7
commit 822c7b1352
2 changed files with 19 additions and 0 deletions

View File

@@ -20,6 +20,16 @@ public class EmailMappingProfile : Profile
.ForMember(dest => dest.Sender, opt => opt.Ignore())
.ForMember(dest => dest.Attachments, opt => opt.MapFrom(src => src.Attachments));
// PublishEmailViaImapCommand -> EmailContext
CreateMap<PublishEmailViaImapCommand, EmailContext>()
.ForMember(dest => dest.Sender, opt => opt.Ignore())
.ForMember(dest => dest.Attachments, opt => opt.MapFrom(src => src.Attachments));
// PublishEmailViaOAuth2Command -> EmailContext
CreateMap<PublishEmailViaOAuth2Command, EmailContext>()
.ForMember(dest => dest.Sender, opt => opt.Ignore())
.ForMember(dest => dest.Attachments, opt => opt.MapFrom(src => src.Attachments));
// EmailAccountDto -> EmailAccount
CreateMap<EmailAccount, EmailAccountDto>();
CreateMap<EmailAccountModificationDto, EmailAccount>();