Skip to content

Commit 7b7436d

Browse files
committed
Minor Changes
1 parent 237ada2 commit 7b7436d

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed
23.7 KB
Loading

Shortify.NET.Application/Users/Events/PasswordChangedDomainEventHandler.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
using Shortify.NET.Common.Messaging.Abstractions;
2-
using Shortify.NET.Core.Events;
3-
using System.ComponentModel.DataAnnotations;
4-
using Shortify.NET.Core.Entites;
5-
using static Shortify.NET.Application.Shared.Constant.EmailConstants;
1+
using System.ComponentModel.DataAnnotations;
62
using System.Text;
73
using Shortify.NET.Application.Abstractions;
84
using Shortify.NET.Application.Abstractions.Repositories;
95
using Shortify.NET.Application.Shared;
106
using Shortify.NET.Application.Shared.Models;
7+
using Shortify.NET.Common.Messaging.Abstractions;
8+
using Shortify.NET.Core.Entites;
9+
using Shortify.NET.Core.Events;
1110

1211
namespace Shortify.NET.Application.Users.Events
1312
{
@@ -25,18 +24,18 @@ public async Task Handle(PasswordChangedDomainEvent domainEvent, CancellationTok
2524
var user = await _userRepository.GetByIdAsync(domainEvent.UserId, cancellationToken) ??
2625
throw new ValidationException("User Not Found.");
2726

28-
await SendWelcomeEmail(user, cancellationToken);
27+
await SendPasswordChangedEmail(user, cancellationToken);
2928
}
3029

3130
#region Private Methods
3231

3332
/// <summary>
34-
/// To Send Welcome Email
33+
/// To Send Password Changed Email
3534
/// </summary>
3635
/// <param name="user"></param>
3736
/// <param name="cancellationToken"></param>
3837
/// <returns></returns>
39-
private async Task SendWelcomeEmail(User user, CancellationToken cancellationToken)
38+
private async Task SendPasswordChangedEmail(User user, CancellationToken cancellationToken)
4039
{
4140
MailRequest mailRequest = new
4241
(

Shortify.NET.Application/Users/Events/UserRegisteredDomainEventHandler.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
using Shortify.NET.Common.Messaging.Abstractions;
2-
using Shortify.NET.Core.Entites;
3-
using Shortify.NET.Core.Events;
4-
using System.ComponentModel.DataAnnotations;
1+
using System.ComponentModel.DataAnnotations;
52
using System.Text;
63
using Shortify.NET.Application.Abstractions;
74
using Shortify.NET.Application.Abstractions.Repositories;
85
using Shortify.NET.Application.Shared;
96
using Shortify.NET.Application.Shared.Models;
10-
using static Shortify.NET.Application.Shared.Constant.EmailConstants;
7+
using Shortify.NET.Common.Messaging.Abstractions;
8+
using Shortify.NET.Core.Entites;
9+
using Shortify.NET.Core.Events;
1110

1211
namespace Shortify.NET.Application.Users.Events
1312
{

0 commit comments

Comments
 (0)