|
|
@@ -26,17 +26,6 @@ final class DownloadRequestProvider implements ProviderInterface
|
|
|
private readonly FileManager $fileManager,
|
|
|
) {}
|
|
|
|
|
|
- /**
|
|
|
- * @param string $resourceClass
|
|
|
- * @param string|null $operationName
|
|
|
- * @param array<mixed> $context
|
|
|
- * @return bool
|
|
|
- */
|
|
|
- public function supports(string $resourceClass, string $operationName = null, array $context = []): bool
|
|
|
- {
|
|
|
- return DownloadRequest::class === $resourceClass;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* @param Operation $operation
|
|
|
* @param array<mixed> $uriVariables
|
|
|
@@ -50,9 +39,7 @@ final class DownloadRequestProvider implements ProviderInterface
|
|
|
throw new RuntimeException('not supported', 500);
|
|
|
}
|
|
|
|
|
|
- $id = $uriVariables['fileId'];
|
|
|
-
|
|
|
- return $this->serveFile($id);
|
|
|
+ return $this->serveFile($uriVariables['fileId']);
|
|
|
}
|
|
|
|
|
|
/**
|