fix conflicts after updates
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user