1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-10 23:24:04 +02:00

feat(endpoints): update endpoints for Images service

This commit is contained in:
Awilum
2021-09-03 11:01:48 +03:00
parent ddacb495c4
commit 55be04bfa5

View File

@@ -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());
}
}