Files
api-generator/Generator/Mappers/CredentialsMapper.cs
2025-10-11 13:08:09 +02:00

27 lines
648 B
C#

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
};
}
}