Import from internal git
This commit is contained in:
27
Generator/Mappers/CredentialsMapper.cs
Normal file
27
Generator/Mappers/CredentialsMapper.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Core.Actions;
|
||||
using Core.Dto.Settings;
|
||||
using Core.Settings;
|
||||
|
||||
namespace Generator.Mappers;
|
||||
|
||||
public static class CredentialsMapper
|
||||
{
|
||||
public static CredentialsConfig Map(this CredentialsConfigDto dto)
|
||||
=> new()
|
||||
{
|
||||
Email = dto.Email,
|
||||
Token = dto.Token,
|
||||
Username = dto.Username,
|
||||
Password = dto.Password,
|
||||
AlwaysAuth = dto.AlwaysAuth
|
||||
};
|
||||
|
||||
public static PackageDeletion ToPackageDeletion(this CredentialsConfigDto dto)
|
||||
{
|
||||
return new PackageDeletion
|
||||
{
|
||||
Username = dto.Username,
|
||||
Password = dto.Password
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user