diff --git a/Domains/Account/CrossCutting/AccountCrossCutting.cs b/Domains/Account/CrossCutting/AccountCrossCutting.cs index 0d2bd70..8af1d84 100644 --- a/Domains/Account/CrossCutting/AccountCrossCutting.cs +++ b/Domains/Account/CrossCutting/AccountCrossCutting.cs @@ -50,14 +50,13 @@ await PopulateDefaultAccountRolesAsync(serviceProvider) // Create default user data CreateAccountDto accountDto = new() { - UserName = "admin", Email = "admin@localhost.com", FirstName = "Panagiotis", LastName = "Kosmidis", Password = "Administrator1!" }; - if (userManager.Users.All(u => u.UserName != accountDto.UserName)) + if (userManager.Users.All(u => u.UserName != accountDto.Email)) { var orchestrator = serviceProvider.GetRequiredService>(); @@ -67,7 +66,6 @@ await PopulateDefaultAccountRolesAsync(serviceProvider) OrchestratorResponse requestResult = await orchestrator .SendCommandAsync( new CreateAccountCommand( - accountDto.UserName, accountDto.Password, accountDto.FirstName, accountDto.LastName, @@ -77,7 +75,7 @@ await PopulateDefaultAccountRolesAsync(serviceProvider) .ConfigureAwait(false); if (!requestResult.Succeeded) - throw new NotSupportedException($"Unable to create default user \"{accountDto.UserName}\"."); + throw new NotSupportedException($"Unable to create default user \"{accountDto.Email}\"."); } }