mirror of
https://github.com/bitwarden/server.git
synced 2025-04-16 10:38:17 -05:00
Add the phishing domain controller
This commit is contained in:
parent
9a6d0e93f8
commit
011d86417d
17
src/Api/Controllers/PhishingDomainsController.cs
Normal file
17
src/Api/Controllers/PhishingDomainsController.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user