Small fix on user creation
This commit is contained in:
@@ -79,6 +79,11 @@ public class IdentityService(
|
|||||||
|
|
||||||
var response = await userManager.CreateAsync(applicationUser, password);
|
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);
|
var result = new Result<Guid>(applicationUser.Id, response.Succeeded, response.ToApplicationResult().Errors);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user