Skip to content

Commit

Permalink
Fix: Nome e corpo do template de emails sem validação.
Browse files Browse the repository at this point in the history
  • Loading branch information
LibardiFelipe committed Oct 10, 2022
1 parent 770fff3 commit cb2deee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion TemplateBase.Domain/Services/TemplateEmailService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ public async Task<TemplateEmail> UpdateTemplateEmailAsync(Guid id, string name,

entity.ChangeBody(body)
.ChangeName(name);
AddNotifications(entity);

repo.Update(entity);
if (Notifications.Any())
return null;

repo.Update(entity);
if (await _uow.CommitAsync(cancellationToken) > 0)
return entity;

Expand Down

0 comments on commit cb2deee

Please sign in to comment.