1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-16 01:54:28 +02:00

feat(core): use PATH['uploads'] in Delivery Images API

This commit is contained in:
Awilum
2020-02-19 23:39:51 +03:00
parent 0a89f3395a
commit 17a8577ee9

View File

@@ -47,7 +47,7 @@ $app->get('/api/delivery/images/{path:.+}', function (Request $request, Response
// Update calls counter
Filesystem::write($delivery_images_token_file_path, $flextype['parser']->encode(array_replace_recursive($delivery_images_token_file_data, ['calls' => $delivery_images_token_file_data['calls'] + 1]), 'yaml'));
if (Filesystem::has(PATH['entries'] . '/' . $args['path'])) {
if (Filesystem::has(PATH['uploads'] . '/entries/' . $args['path'])) {
return $flextype['images']->getImageResponse($args['path'], $_GET);
} else {
return $response->withJson([], 404);