Small fix on user creation

This commit is contained in:
Dominic Villemure
2024-09-07 10:55:46 -04:00
parent 6dc83ff9bd
commit 646e5e66b4

View File

@@ -79,6 +79,11 @@ public class IdentityService(
var response = await userManager.CreateAsync(applicationUser, password);
if (!response.Succeeded)
{
throw new BadHttpRequestException(response.Errors.First().Description);
}
var result = new Result<Guid>(applicationUser.Id, response.Succeeded, response.ToApplicationResult().Errors);
return result;