many fixes and improvements - rework for modules/ and common/
feat(emailer): add Postmark and Resend providers
This commit is contained in:
14
backend/Modules/Identity/IdentityResultExtensions.cs
Normal file
14
backend/Modules/Identity/IdentityResultExtensions.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Hutopy.Modules.Identity.Models;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Hutopy.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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user