diff --git a/src/Controller/OgRepository/Image/ConvertImageToVirtualAction.php b/src/Controller/OgRepository/Image/ConvertImageToVirtualAction.php index 898e67f..cf3545c 100644 --- a/src/Controller/OgRepository/Image/ConvertImageToVirtualAction.php +++ b/src/Controller/OgRepository/Image/ConvertImageToVirtualAction.php @@ -4,6 +4,7 @@ namespace App\Controller\OgRepository\Image; use App\Controller\OgRepository\AbstractOgRepositoryController; use App\Dto\Input\BackupImageInput; +use App\Dto\Input\ConvertImageToVirtualInput; use App\Entity\ImageImageRepository; use App\Model\CommandTypes; use App\Model\ImageStatus; @@ -26,7 +27,7 @@ class ConvertImageToVirtualAction extends AbstractOgRepositoryController * @throws RedirectionExceptionInterface * @throws ClientExceptionInterface */ - public function __invoke(ConvertImageToVirtualAction $input, ImageImageRepository $imageImageRepository): JsonResponse + public function __invoke(ConvertImageToVirtualInput $input, ImageImageRepository $imageImageRepository): JsonResponse { $image = $imageImageRepository->getImage(); @@ -37,7 +38,7 @@ class ConvertImageToVirtualAction extends AbstractOgRepositoryController $params = [ 'json' => [ 'ID_img' => $imageImageRepository->getImageFullsum(), - 'vm_extension' => 'opengnsys' + 'vm_extension' => $input->extension, ] ]; diff --git a/src/Controller/OgRepository/Webhook/ResponseController.php b/src/Controller/OgRepository/Webhook/ResponseController.php index fd56f3a..b4900f7 100644 --- a/src/Controller/OgRepository/Webhook/ResponseController.php +++ b/src/Controller/OgRepository/Webhook/ResponseController.php @@ -37,7 +37,8 @@ class ResponseController extends AbstractOgRepositoryController str_starts_with($action, "CreateAuxiliarFiles_") => $this->handleImageRepositoryAction($data, true), str_starts_with($action, "TransferImage_"), str_starts_with($action, "ExportImage_") => $this->processImageAction($data), str_starts_with($action, "BackupImage_") => $this->handleImageRepositoryAction($data), - str_starts_with($action, "ConvertImage_") => $this->handleImageRepositoryAction($data), + str_starts_with($action, "ConvertImageToVirtual") => $this->handleImageRepositoryAction($data), + str_starts_with($action, "ConvertImageFromVirtual") => $this->handleImageRepositoryAction($data), default => $this->jsonResponseError('Invalid action', Response::HTTP_BAD_REQUEST), }; }