refs #2120. Remove pxe template when removed client

develop
Manuel Aranda Rosales 2025-06-02 07:35:27 +02:00
parent 64eeb5c88e
commit d13e24cc23
1 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@ namespace App\EventListener;
use App\Controller\OgBoot\PxeBootFile\DeleteAction;
use App\Controller\OgBoot\PxeBootFile\PostAction;
use App\Controller\OgDhcp\Subnet\PutHostAction;
use App\Entity\Client;
use Doctrine\Bundle\DoctrineBundle\Attribute\AsEntityListener;
use Doctrine\ORM\Event\PreUpdateEventArgs;
@ -18,6 +19,7 @@ readonly class ClientMacListener
{
public function __construct(
private DeleteAction $deleteAction,
private PutHostAction $putHostAction,
)
{
@ -45,7 +47,7 @@ readonly class ClientMacListener
return;
}
$this->putHostAction->__invoke($oldMac, $client);
$this->deleteAction->__invoke($oldMac);
}
}