mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat(api): add tld filters
This commit is contained in:
@@ -4,7 +4,6 @@ namespace App\Entity;
|
|||||||
|
|
||||||
use ApiPlatform\Metadata\ApiResource;
|
use ApiPlatform\Metadata\ApiResource;
|
||||||
use ApiPlatform\Metadata\Get;
|
use ApiPlatform\Metadata\Get;
|
||||||
use ApiPlatform\Metadata\GetCollection;
|
|
||||||
use App\Controller\DomainRefreshController;
|
use App\Controller\DomainRefreshController;
|
||||||
use App\Repository\DomainRepository;
|
use App\Repository\DomainRepository;
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ use Symfony\Component\Serializer\Attribute\SerializedName;
|
|||||||
normalizationContext: [
|
normalizationContext: [
|
||||||
'groups' => [
|
'groups' => [
|
||||||
'nameserver:item',
|
'nameserver:item',
|
||||||
'domain:list',
|
|
||||||
'nameserver-entity:entity',
|
'nameserver-entity:entity',
|
||||||
'entity:list',
|
'entity:list',
|
||||||
"event:list"
|
"event:list"
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
|
||||||
|
use ApiPlatform\Metadata\ApiFilter;
|
||||||
use ApiPlatform\Metadata\ApiResource;
|
use ApiPlatform\Metadata\ApiResource;
|
||||||
use ApiPlatform\Metadata\Get;
|
use ApiPlatform\Metadata\Get;
|
||||||
use ApiPlatform\Metadata\GetCollection;
|
use ApiPlatform\Metadata\GetCollection;
|
||||||
@@ -27,6 +29,7 @@ use Symfony\Component\Serializer\Attribute\Groups;
|
|||||||
)
|
)
|
||||||
]
|
]
|
||||||
)]
|
)]
|
||||||
|
#[ApiFilter(SearchFilter::class)]
|
||||||
#[ORM\Entity(repositoryClass: TldRepository::class)]
|
#[ORM\Entity(repositoryClass: TldRepository::class)]
|
||||||
class Tld
|
class Tld
|
||||||
{
|
{
|
||||||
@@ -65,6 +68,7 @@ class Tld
|
|||||||
private ?bool $specification13 = null;
|
private ?bool $specification13 = null;
|
||||||
|
|
||||||
#[ORM\Column(length: 10, nullable: true, enumType: TldType::class)]
|
#[ORM\Column(length: 10, nullable: true, enumType: TldType::class)]
|
||||||
|
#[Groups(["tld:item"])]
|
||||||
private ?TldType $type = null;
|
private ?TldType $type = null;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|||||||
Reference in New Issue
Block a user