feat: move getImage response to admin
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
export function getThumb(imageUrl) {
|
||||
const route = 'extension/tgshop/handle';
|
||||
const url = new URL(`${window.TeleCart.shop_base_url}/index.php?route=${route}&api_action=getImage&path=${imageUrl}&size=100x100`);
|
||||
const url = new URL(`${window.TeleCart.shop_base_url}/admin/index.php`);
|
||||
url.searchParams.set('route', 'extension/module/tgshop/handle');
|
||||
url.searchParams.set('api_action', 'getImage');
|
||||
url.searchParams.set('path', imageUrl);
|
||||
url.searchParams.set('size', '100x100');
|
||||
url.searchParams.set('user_token', window.TeleCart.user_token);
|
||||
return url.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Handlers;
|
||||
namespace Bastion\Handlers;
|
||||
|
||||
use Openguru\OpenCartFramework\Http\Request;
|
||||
use Openguru\OpenCartFramework\ImageTool\ImageFactory;
|
||||
@@ -3,6 +3,7 @@
|
||||
use Bastion\Handlers\AutocompleteHandler;
|
||||
use Bastion\Handlers\DictionariesHandler;
|
||||
use Bastion\Handlers\FormsHandler;
|
||||
use Bastion\Handlers\ImageHandler;
|
||||
use Bastion\Handlers\LogsHandler;
|
||||
use Bastion\Handlers\SendMessageHandler;
|
||||
use Bastion\Handlers\SettingsHandler;
|
||||
@@ -19,6 +20,7 @@ return [
|
||||
'getChatId' => [TelegramHandler::class, 'getChatId'],
|
||||
'getDashboardStats' => [StatsHandler::class, 'getDashboardStats'],
|
||||
'getFormByAlias' => [FormsHandler::class, 'getFormByAlias'],
|
||||
'getImage' => [ImageHandler::class, 'getImage'],
|
||||
'getLogs' => [LogsHandler::class, 'getLogs'],
|
||||
'getProductsById' => [AutocompleteHandler::class, 'getProductsById'],
|
||||
'getSettingsForm' => [SettingsHandler::class, 'getSettingsForm'],
|
||||
|
||||
@@ -7,7 +7,6 @@ use App\Handlers\ETLHandler;
|
||||
use App\Handlers\FiltersHandler;
|
||||
use App\Handlers\FormsHandler;
|
||||
use App\Handlers\HealthCheckHandler;
|
||||
use App\Handlers\ImageHandler;
|
||||
use App\Handlers\OrderHandler;
|
||||
use App\Handlers\PrivacyPolicyHandler;
|
||||
use App\Handlers\ProductsHandler;
|
||||
@@ -23,7 +22,6 @@ return [
|
||||
'filtersForMainPage' => [FiltersHandler::class, 'getFiltersForMainPage'],
|
||||
'getCart' => [CartHandler::class, 'index'],
|
||||
'getForm' => [FormsHandler::class, 'getForm'],
|
||||
'getImage' => [ImageHandler::class, 'getImage'],
|
||||
'health' => [HealthCheckHandler::class, 'handle'],
|
||||
'ingest' => [TelemetryHandler::class, 'ingest'],
|
||||
'heartbeat' => [TelemetryHandler::class, 'heartbeat'],
|
||||
|
||||
Reference in New Issue
Block a user