using ErsatzTV.Core.Domain;
using ErsatzTV.Core.Interfaces.Repositories;

namespace ErsatzTV.Application.Auth;

public class GetLocalAdminSecurityStampHandler(IConfigElementRepository configElementRepository)
    : IRequestHandler<GetLocalAdminSecurityStamp, Option<string>>
{
    public async Task<Option<string>> Handle(GetLocalAdminSecurityStamp request, CancellationToken cancellationToken) =>
        await configElementRepository.GetValue<string>(ConfigElementKey.AuthSecurityStamp, cancellationToken);
}
