mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
672 B
16 lines
672 B
using ErsatzTV.Core.Domain; |
|
using ErsatzTV.Core.Interfaces.Repositories; |
|
|
|
namespace ErsatzTV.Application.Configuration; |
|
|
|
public class GetPlayoutDaysToBuildHandler : IRequestHandler<GetPlayoutDaysToBuild, int> |
|
{ |
|
private readonly IConfigElementRepository _configElementRepository; |
|
|
|
public GetPlayoutDaysToBuildHandler(IConfigElementRepository configElementRepository) => |
|
_configElementRepository = configElementRepository; |
|
|
|
public Task<int> Handle(GetPlayoutDaysToBuild request, CancellationToken cancellationToken) => |
|
_configElementRepository.GetValue<int>(ConfigElementKey.PlayoutDaysToBuild) |
|
.Map(result => result.IfNone(2)); |
|
}
|
|
|