-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from OpenMAVN/10-add-admin-email-verified
10 add admin email verified
- Loading branch information
Showing
18 changed files
with
706 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/MAVN.Service.CustomerProfile.DomainServices/Subscribers/AdminEmailVerifiedSubscriber.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Threading.Tasks; | ||
using Common.Log; | ||
using Lykke.Common.Log; | ||
using Lykke.RabbitMqBroker.Subscriber; | ||
using MAVN.Service.AdminManagement.Contract.Events; | ||
using MAVN.Service.CustomerProfile.Domain.Services; | ||
|
||
namespace MAVN.Service.CustomerProfile.DomainServices.Subscribers | ||
{ | ||
public class AdminEmailVerifiedSubscriber : JsonRabbitSubscriber<AdminEmailVerifiedEvent> | ||
{ | ||
private const string ExchangeName = "lykke.admin.emailcodeverified"; | ||
private const string QueueName = "customerprofile"; | ||
|
||
private readonly IAdminProfileService _adminProfileService; | ||
private readonly ILog _log; | ||
|
||
public AdminEmailVerifiedSubscriber( | ||
string connectionString, | ||
IAdminProfileService adminProfileService, | ||
ILogFactory logFactory) | ||
: base(connectionString, ExchangeName, QueueName, logFactory) | ||
{ | ||
_adminProfileService = adminProfileService; | ||
_log = logFactory.CreateLog(this); | ||
} | ||
|
||
protected override async Task ProcessMessageAsync(AdminEmailVerifiedEvent message) | ||
{ | ||
await _adminProfileService.SetEmailAsVerifiedAsync(message.AdminId); | ||
|
||
_log.Info($"Processed admin email verified event", message); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.