|
|
|
@@ -4,6 +4,7 @@ namespace App\Controller; |
|
|
|
|
|
|
|
use App\Service\RegistrationService; |
|
|
|
use App\Service\SlugGenerator; |
|
|
|
use Psr\Log\LoggerInterface; |
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; |
|
|
|
use Symfony\Component\HttpFoundation\JsonResponse; |
|
|
|
use Symfony\Component\HttpFoundation\Request; |
|
|
|
@@ -16,6 +17,7 @@ class RegistrationController extends AbstractController |
|
|
|
private readonly RegistrationService $registrationService, |
|
|
|
private readonly SlugGenerator $slugGenerator, |
|
|
|
private readonly string $appDomain, |
|
|
|
private readonly LoggerInterface $logger, |
|
|
|
) {} |
|
|
|
|
|
|
|
#[Route('/register', name: 'app_register')] |
|
|
|
@@ -79,8 +81,12 @@ class RegistrationController extends AbstractController |
|
|
|
} catch (\DomainException $e) { |
|
|
|
return $this->json(['errors' => [$e->getMessage()]], Response::HTTP_UNPROCESSABLE_ENTITY); |
|
|
|
} catch (\Throwable $e) { |
|
|
|
$this->logger->error('Registration failed: ' . $e->getMessage(), ['exception' => $e]); |
|
|
|
return $this->json(['errors' => ['Ein Fehler ist aufgetreten. Bitte versuche es erneut.']], Response::HTTP_INTERNAL_SERVER_ERROR); |
|
|
|
} |
|
|
|
// } catch (\Throwable $e) { |
|
|
|
// return $this->json(['errors' => ['Ein Fehler ist aufgetreten. Bitte versuche es erneut.']], Response::HTTP_INTERNAL_SERVER_ERROR); |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
#[Route('/verify/{token}', name: 'app_verify')] |
|
|
|
|