feat: update allowed frontend hosts and add clinic-pro.ir domain
This commit is contained in:
@@ -3,16 +3,23 @@
|
||||
namespace App\Shared\Controller;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Cache\CacheItemPoolInterface;
|
||||
use Psr\Log\LoggerAwareInterface;
|
||||
use Psr\Log\NullLogger;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Contracts\Cache\CacheInterface;
|
||||
|
||||
class HealthController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly CacheInterface $cache,
|
||||
) {}
|
||||
private readonly CacheItemPoolInterface $healthPool,
|
||||
) {
|
||||
// probe سلامت نباید هنگام افتادن redis لاگ warning تولید کند؛ logger این pool را خنثی میکنیم.
|
||||
if ($this->healthPool instanceof LoggerAwareInterface) {
|
||||
$this->healthPool->setLogger(new NullLogger());
|
||||
}
|
||||
}
|
||||
|
||||
#[Route('/health', methods: ['GET'])]
|
||||
public function __invoke(): JsonResponse
|
||||
@@ -29,7 +36,7 @@ class HealthController
|
||||
}
|
||||
|
||||
try {
|
||||
$item = $this->cache->getItem('health_check');
|
||||
$this->healthPool->getItem('health_check');
|
||||
$checks['redis'] = 'ok';
|
||||
} catch (\Throwable) {
|
||||
$checks['redis'] = 'error';
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Shared\Message;
|
||||
|
||||
class SendSmsMessage
|
||||
{
|
||||
public function __construct(
|
||||
public readonly string $mobile,
|
||||
public readonly string $message,
|
||||
public readonly ?int $smsLogId = null,
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user