Files
wyczarujprezent.pl/modules/ps_eventbus/controllers/front/apiHealthCheck.php
2024-10-28 22:14:22 +01:00

28 lines
744 B
PHP

<?php
use PrestaShop\Module\PsEventbus\Config\Config;
use PrestaShop\Module\PsEventbus\Controller\AbstractApiController;
use PrestaShop\Module\PsEventbus\Repository\ServerInformationRepository;
class ps_EventbusApiHealthCheckModuleFrontController extends AbstractApiController
{
public $type = Config::COLLECTION_SHOPS;
public function init()
{
}
/**
* @return void
*/
public function postProcess()
{
/** @var ServerInformationRepository $serverInformationRepository */
$serverInformationRepository = $this->module->getService(ServerInformationRepository::class);
$status = $serverInformationRepository->getHealthCheckData();
$this->exitWithResponse($status);
}
}