ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package GeoIP Data for Magento 2 (System)
|
||||
*/
|
||||
|
||||
namespace Amasty\Geoip\Controller\Adminhtml\Geoip;
|
||||
|
||||
use Amasty\Geoip\Controller\Adminhtml\GeoipAbstract;
|
||||
|
||||
class Commit extends GeoipAbstract
|
||||
{
|
||||
public function execute()
|
||||
{
|
||||
$result = [];
|
||||
|
||||
try {
|
||||
$type = $this->getRequest()->getParam('type');
|
||||
$action = $this->getRequest()->getParam('action');
|
||||
$isDownload = false;
|
||||
if ($action == 'download_and_import') {
|
||||
$isDownload = true;
|
||||
}
|
||||
$this->importModel->commitProcess($type, $isDownload);
|
||||
$result['status'] = 'done';
|
||||
$result['full_import_done'] = $this->geoipHelper->isDone() ? "1" : "0";
|
||||
} catch (\Exception $e) {
|
||||
$result['error'] = $e->getMessage();
|
||||
}
|
||||
|
||||
$this->getResponse()->setBody($this->jsonHelper->jsonEncode($result));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user