fix(dump): correct DI wiring, config types, and runtime version query
This commit is contained in:
@@ -6,7 +6,8 @@ use AeonDumpManager\MessageQueue\Message\CreateDumpMessage;
|
||||
use AeonDumpManager\Service\DumpJobStatusService;
|
||||
use AeonDumpManager\Service\DumpLister;
|
||||
use AeonDumpManager\Service\DumpService;
|
||||
use Shopware\Core\Framework\Api\Route\ApiRouteScope;
|
||||
use AeonDumpManager\Service\Exception\DumpNotFoundException;
|
||||
use Shopware\Core\Framework\Routing\ApiRouteScope;
|
||||
use Shopware\Core\PlatformRequest;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
@@ -67,7 +68,11 @@ class DumpController
|
||||
)]
|
||||
public function delete(string $filename): JsonResponse
|
||||
{
|
||||
$this->dumpService->delete($filename);
|
||||
try {
|
||||
$this->dumpService->delete($filename);
|
||||
} catch (DumpNotFoundException $exception) {
|
||||
return new JsonResponse(['message' => $exception->getMessage()], Response::HTTP_NOT_FOUND);
|
||||
}
|
||||
|
||||
return new JsonResponse(null, Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user