fix conflicts after updates

This commit is contained in:
2025-08-22 19:19:59 +02:00
parent eae83adee4
commit 5e5458d87c
12 changed files with 57 additions and 26 deletions

View File

@@ -2,6 +2,8 @@
using EnvelopeGenerator.Application.Dto;
using EnvelopeGenerator.Domain.Entities;
using MediatR;
using Microsoft.EntityFrameworkCore;
using System.Linq;
namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Reset;
@@ -31,10 +33,10 @@ public class ResetEmailTemplateCommandHandler : IRequestHandler<ResetEmailTempla
public async Task Handle(ResetEmailTemplateCommand request, CancellationToken cancel)
{
var temps = request.Id is not null
? await _repository.ReadAllAsync<EmailTemplateDto>(t => t.Id == request.Id, cancel)
? await _repository.ReadOnly().Where(t => t.Id == request.Id).ToListAsync(cancel)
: request.Type is not null
? await _repository.ReadAllAsync<EmailTemplateDto>(t => t.Name == request.Type.ToString(), cancel)
: await _repository.ReadAllAsync<EmailTemplateDto>(cancellation: cancel);
? await _repository.ReadOnly().Where(t => t.Name == request.Type.ToString()).ToListAsync(cancel)
: await _repository.ReadOnly().ToListAsync(cancel);
foreach (var temp in temps)
{