15 lines
398 B
C#
15 lines
398 B
C#
using Socialize.Api.Modules.Identity.Models;
|
|
using Microsoft.AspNetCore.Identity;
|
|
|
|
namespace Socialize.Api.Modules.Identity;
|
|
|
|
public static class IdentityResultExtensions
|
|
{
|
|
public static Result ToApplicationResult(this IdentityResult result)
|
|
{
|
|
return result.Succeeded
|
|
? Result.Success()
|
|
: Result.Failure(result.Errors.Select(e => e.Description));
|
|
}
|
|
}
|