#48 cleaned userService. We will use IdentityService only

This commit is contained in:
Dominic Villemure
2024-06-02 14:45:28 -04:00
parent 82b01c9448
commit d5048d3a06
11 changed files with 97 additions and 134 deletions

View File

@@ -1,6 +1,6 @@
using Hutopy.Application.Users.Commands;
using Hutopy.Application.Common.Interfaces;
using Hutopy.Application.Users.Commands;
using Hutopy.Application.Users.Queries.GetMinimalUser;
using Hutopy.Domain.Interfaces;
using Hutopy.Infrastructure.Identity;
namespace Hutopy.Web.Endpoints;
@@ -15,9 +15,9 @@ public class Users : EndpointGroupBase
.MapIdentityApi<ApplicationUser>();
}
private static async Task<Guid> CreateUser(ISender sender, CreateUserCommand command, IUserService userService)
private static async Task<Guid> CreateUser(ISender sender, CreateUserCommand command, IIdentityService identityService)
{
await userService.CreateUserAsync(command.EmailAddress, command.UserName, command.FirstName, command.LastName, command.Password);
await identityService.CreateUserAsync(command.EmailAddress, command.UserName, command.FirstName, command.LastName, command.Password);
return await sender.Send(command);
}