Removed todos and added User endpoint combined with register. Id changed to guid

This commit is contained in:
Dominic Villemure
2024-04-03 23:57:01 -04:00
parent df8b42bdf1
commit 1f795c53bb
67 changed files with 1750 additions and 1895 deletions

View File

@@ -0,0 +1,24 @@
using Hutopy.Domain.Interfaces;
using Hutopy.Infrastructure.Identity;
using Microsoft.AspNetCore.Identity;
namespace Hutopy.Infrastructure.Services;
public class UserService(UserManager<ApplicationUser> userManager, SignInManager<ApplicationUser> signInManager) : IUserService
{
private readonly UserManager<ApplicationUser> _userManager = userManager;
private readonly SignInManager<ApplicationUser> _signInManager = signInManager;
public async Task CreateUserAsync(string email, string userName, string password)
{
var applicationUser = new ApplicationUser
{
UserName = userName,
Email = email,
};
await _userManager.CreateAsync(applicationUser, password);
}
}