20 lines
607 B
C#
20 lines
607 B
C#
|
using Mirea.Api.Endpoint.Configuration.Model;
|
|||
|
using Mirea.Api.Security.Common.Model;
|
|||
|
|
|||
|
namespace Mirea.Api.Endpoint.Common.MapperDto;
|
|||
|
|
|||
|
public static class UserConverter
|
|||
|
{
|
|||
|
public static User ConvertToSecurity(this Admin data) =>
|
|||
|
new()
|
|||
|
{
|
|||
|
Id = 1.ToString(),
|
|||
|
Email = data.Email,
|
|||
|
Username = data.Username,
|
|||
|
PasswordHash = data.PasswordHash,
|
|||
|
Salt = data.Salt,
|
|||
|
SecondFactorToken = data.Secret,
|
|||
|
TwoFactorAuthenticator = data.TwoFactorAuthenticator,
|
|||
|
OAuthProviders = data.OAuthProviders
|
|||
|
};
|
|||
|
}
|