Logos, robots and some fixs

This commit is contained in:
Xbird
2022-08-08 17:19:06 +00:00
parent 9918c6bad9
commit 4f00470223
54 changed files with 235 additions and 59 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Controller;
use App\Form\MeType;
use App\Form\MePasswordType;
use Psr\Log\LoggerInterface;
use Knp\Component\Pager\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Security;
@@ -16,10 +17,12 @@ use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
class MeController extends AbstractController
{
private Security $security;
private LoggerInterface $logger;
public function __construct(Security $security)
public function __construct(Security $security, LoggerInterface $logger)
{
$this->security = $security;
$this->logger = $logger;
}
#[Route('/', name: 'index')]
@@ -40,6 +43,8 @@ class MeController extends AbstractController
} catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG
} else {
$this->logger->error($th);
}
$this->addFlash('danger', 'alert_error_editing_profile');
@@ -88,6 +93,8 @@ class MeController extends AbstractController
} catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG
} else {
$this->logger->error($th);
}
$this->addFlash('danger', 'alert_error_editing_password');