Some logging
This commit is contained in:
@@ -18,7 +18,6 @@ public class GetFutureCreatorListQueryHandler(
|
|||||||
{
|
{
|
||||||
public async Task<PaginatedList<FutureCreatorListDto>> Handle(GetFutureCreatorListQuery request, CancellationToken cancellationToken)
|
public async Task<PaginatedList<FutureCreatorListDto>> Handle(GetFutureCreatorListQuery request, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
Console.WriteLine(request);
|
|
||||||
return await context.FutureCreators
|
return await context.FutureCreators
|
||||||
.OrderBy(x => x.FirstName)
|
.OrderBy(x => x.FirstName)
|
||||||
.ProjectTo<FutureCreatorListDto>(mapper.ConfigurationProvider)
|
.ProjectTo<FutureCreatorListDto>(mapper.ConfigurationProvider)
|
||||||
|
|||||||
@@ -18,7 +18,13 @@ public class UserService(UserManager<ApplicationUser> userManager, SignInManager
|
|||||||
Email = email,
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user