20 lines
461 B
C#
20 lines
461 B
C#
|
|
using FreeTubeSync.Model;
|
||
|
|
|
||
|
|
namespace FreeTubeSync.SpecialResponses;
|
||
|
|
|
||
|
|
public static class Mappings
|
||
|
|
{
|
||
|
|
public static SettingResponse MapToResponse(this Setting setting)
|
||
|
|
{
|
||
|
|
return new SettingResponse
|
||
|
|
{
|
||
|
|
_id = setting._id,
|
||
|
|
value = setting.Value
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
public static IEnumerable<SettingResponse> MapToResponse(this IEnumerable<Setting> settings)
|
||
|
|
{
|
||
|
|
return settings.Select(MapToResponse);
|
||
|
|
}
|
||
|
|
}
|