using Bit.Core; using Bit.Core.Repositories; using Bit.Core.Services; using Microsoft.AspNetCore.Mvc; namespace Bit.Api.Controllers; [Route("phishing-domains")] public class PhishingDomainsController(IPhishingDomainRepository phishingDomainRepository, IFeatureService featureService) : Controller { [HttpGet] public async Task>> GetPhishingDomainsAsync() { if (!featureService.IsEnabled(FeatureFlagKeys.PhishingDetection)) { return NotFound(); } var domains = await phishingDomainRepository.GetActivePhishingDomainsAsync(); return Ok(domains); } [HttpGet("checksum")] public async Task> GetChecksumAsync() { if (!featureService.IsEnabled(FeatureFlagKeys.PhishingDetection)) { return NotFound(); } var checksum = await phishingDomainRepository.GetCurrentChecksumAsync(); return Ok(checksum); } }