1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-07 22:18:17 -05:00

Add the phishing domain controller

This commit is contained in:
Cy Okeke 2025-03-12 10:21:32 +01:00
parent 9a6d0e93f8
commit 011d86417d
No known key found for this signature in database
GPG Key ID: 88B341B55C84B45C

View File

@ -0,0 +1,17 @@
using Bit.Core.Repositories;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Bit.Api.Controllers;
[Route("phishing-domains")]
[Authorize("Application")]
public class PhishingDomainsController(IPhishingDomainRepository phishingDomainRepository) : Controller
{
[HttpGet]
public async Task<ActionResult<ICollection<string>>> GetPhishingDomainsAsync()
{
var domains = await phishingDomainRepository.GetActivePhishingDomainsAsync();
return Ok(domains);
}
}