Updated softwareProfile end of line
testing/ogcore-api/pipeline/tag This commit looks good
Details
testing/ogcore-api/pipeline/tag This commit looks good
Details
parent
c0f825f937
commit
82c42f04f5
|
@ -89,7 +89,11 @@ class ClientsController extends AbstractController
|
|||
$this->logger->info('Starting software profile creation. ', ['image' => (string) $image->getUuid()]);
|
||||
$this->createSoftwareProfile($data['inv_sft'], $image);
|
||||
$this->logger->info('Start aux files ogrepo API ', ['image' => (string) $image->getUuid()]);
|
||||
$this->createAuxFilesAction->__invoke($image);
|
||||
try {
|
||||
$this->createAuxFilesAction->__invoke($image);
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('Error creating aux files', ['image' => (string) $image->getUuid(), 'error' => $e->getMessage()]);
|
||||
}
|
||||
$this->logger->info('End aux files ogrepo API ', ['image' => (string) $image->getUuid()]);
|
||||
} else {
|
||||
$trace->setStatus(TraceStatus::FAILED);
|
||||
|
@ -127,14 +131,14 @@ class ClientsController extends AbstractController
|
|||
$this->entityManager->flush();
|
||||
}
|
||||
|
||||
return new JsonResponse([], Response::HTTP_OK);
|
||||
return new JsonResponse(data: 'Webhook finished', status: Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function createSoftwareProfile(string $base64Data, Image $image): void
|
||||
{
|
||||
$decodedData = base64_decode($base64Data);
|
||||
$this->logger->info('Software profile decoded', ['data' => '']);
|
||||
$softwareList = array_map('trim', explode(",", $decodedData));
|
||||
$softwareList = array_map('trim', explode("\n", $decodedData));
|
||||
$softwareList = array_filter($softwareList);
|
||||
$existingSoftware = $this->entityManager->getRepository(Software::class)->findBy(['name' => $softwareList]);
|
||||
$existingNames = array_map(fn($software) => $software->getName(), $existingSoftware);
|
||||
|
|
Loading…
Reference in New Issue