Some logging

This commit is contained in:
Dominic Villemure
2024-04-04 00:13:38 -04:00
parent 1f795c53bb
commit 47121b0539
2 changed files with 7 additions and 2 deletions

View File

@@ -18,7 +18,6 @@ public class GetFutureCreatorListQueryHandler(
{
public async Task<PaginatedList<FutureCreatorListDto>> Handle(GetFutureCreatorListQuery request, CancellationToken cancellationToken)
{
Console.WriteLine(request);
return await context.FutureCreators
.OrderBy(x => x.FirstName)
.ProjectTo<FutureCreatorListDto>(mapper.ConfigurationProvider)

View File

@@ -18,7 +18,13 @@ public class UserService(UserManager<ApplicationUser> userManager, SignInManager
Email = email,
};
await _userManager.CreateAsync(applicationUser, password);
//todo: Need to handle errors better for the user.
var response = await _userManager.CreateAsync(applicationUser, password);
if (response.Errors.Any())
{
throw new InvalidOperationException(response.Errors.First().Description);
}
}
}