refs #1967. Sync ogBoot API when put template
testing/ogcore-api/pipeline/head This commit looks good Details

pull/30/head
Manuel Aranda Rosales 2025-05-07 17:07:48 +02:00
parent 927e38102e
commit ef9aee0368
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class InstallOgLiveResponseAction extends AbstractController
{
public CONST string OG_LIVE_INSTALL_SUCCESS = 'success';
public CONST string OG_LIVE_INSTALL_FAILED = 'failure';
const string OG_BOOT_DIRECTORY = '/opt/opengnsys/ogboot/tftpboot//';
const string OG_BOOT_DIRECTORY = '/opt/opengnsys/ogboot/tftpboot/';
public function __construct(
protected readonly EntityManagerInterface $entityManager,
@ -94,7 +94,7 @@ class InstallOgLiveResponseAction extends AbstractController
private function updateOgLive (OgLive $ogLive, mixed $details, string $status): void
{
if ( is_array($details) && $status === self::OG_LIVE_INSTALL_SUCCESS) {
$ogLive->setName($this->simplifyOgLiveFilenameService->__invoke($details['directory']));
$ogLive->setName($this->simplifyOgLiveFilenameService->__invoke(str_replace(self::OG_BOOT_DIRECTORY, '', $details['directory'])));
$ogLive->setDate(new \DateTime($this->extractOgLiveFilenameDateService->__invoke($details['directory'])));
$ogLive->setFilename(str_replace(self::OG_BOOT_DIRECTORY, '', $details['directory']));
$ogLive->setInstalled(true);