fix: adopt changed response class
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Controller;
|
|||||||
|
|
||||||
use App\BusProNet\ApiClient;
|
use App\BusProNet\ApiClient;
|
||||||
use App\BusProNet\Exception\ApiClientException;
|
use App\BusProNet\Exception\ApiClientException;
|
||||||
|
use App\BusProNet\Model\Notification;
|
||||||
use App\Form\Model\RegistrationData;
|
use App\Form\Model\RegistrationData;
|
||||||
use App\Form\RegistrationType;
|
use App\Form\RegistrationType;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
@@ -34,7 +35,7 @@ class RegistrationController extends AbstractController
|
|||||||
if ($form->isSubmitted() && $form->isValid()) {
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
try {
|
try {
|
||||||
$response = $this->apiClient->register($registrationData);
|
$response = $this->apiClient->register($registrationData);
|
||||||
if (true === $response->isError()) {
|
if ($response instanceof Notification) {
|
||||||
$this->addFlash('error', 'Möglicherweise bist du bereits registriert. Bitte setze dein Passwort zurück.');
|
$this->addFlash('error', 'Möglicherweise bist du bereits registriert. Bitte setze dein Passwort zurück.');
|
||||||
} else {
|
} else {
|
||||||
$this->addFlash('success', 'Du erhältst in Kürze eine E-Mail mit einem Link zum (Zurück)setzen deines Passworts.');
|
$this->addFlash('success', 'Du erhältst in Kürze eine E-Mail mit einem Link zum (Zurück)setzen deines Passworts.');
|
||||||
|
|||||||
Reference in New Issue
Block a user