From 55be04bfa57058780263968d34373dddf9822429 Mon Sep 17 00:00:00 2001 From: Awilum Date: Fri, 3 Sep 2021 11:01:48 +0300 Subject: [PATCH] feat(endpoints): update endpoints for Images service --- src/flextype/core/Endpoints/Images.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flextype/core/Endpoints/Images.php b/src/flextype/core/Endpoints/Images.php index 63f80ce6..9a1e7cf1 100644 --- a/src/flextype/core/Endpoints/Images.php +++ b/src/flextype/core/Endpoints/Images.php @@ -40,12 +40,12 @@ class Images extends Api return $this->getApiResponse($response, $this->getStatusCodeMessage($result['http_status_code']), $result['http_status_code']); } - // Check is file exists + // Determine if the image file exists if (! filesystem()->file(flextype()->registry()->get('flextype.settings.images.directory') . '/' . $path)->exists()) { return $this->getApiResponse($response, $this->getStatusCodeMessage(404), 404); } // Return image response - return container()->get('images')->getImageResponse($path, $request->getQueryParams()); + return images()->getImageResponse($path, $request->getQueryParams()); } }