refactor: get interface instead array

This commit is contained in:
Polianin Nikita 2024-12-26 08:42:24 +03:00
parent ae4d2073c4
commit cfe08dcf9b

View File

@ -17,7 +17,7 @@ public static class AvailableProvidersConverter
_ => throw new ArgumentOutOfRangeException(nameof(provider), provider, null) _ => throw new ArgumentOutOfRangeException(nameof(provider), provider, null)
}; };
public static List<AvailableOAuthProvidersResponse> ConvertToDto(this (OAuthProvider Provider, Uri Redirect)[] data) => public static List<AvailableOAuthProvidersResponse> ConvertToDto(this IEnumerable<(OAuthProvider Provider, Uri Redirect)> data) =>
data.Select(x => new AvailableOAuthProvidersResponse() data.Select(x => new AvailableOAuthProvidersResponse()
{ {
ProviderName = Enum.GetName(x.Provider)!, ProviderName = Enum.GetName(x.Provider)!,