From 032e68e7cd184b7a4be7c88397dad8ac41a15c70 Mon Sep 17 00:00:00 2001 From: Ambroise Maupate Date: Fri, 8 Mar 2024 22:35:47 +0100 Subject: [PATCH] fix: LoginController.php with random images --- lib/Rozier/src/Controllers/LoginController.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/Rozier/src/Controllers/LoginController.php b/lib/Rozier/src/Controllers/LoginController.php index 5714ba77..7dea01cb 100644 --- a/lib/Rozier/src/Controllers/LoginController.php +++ b/lib/Rozier/src/Controllers/LoginController.php @@ -41,10 +41,9 @@ public function imageAction(Request $request): Response 'quality' => 80, 'sharpen' => 5, ]); - $response->setData([ + return $response->setData([ 'url' => $this->documentUrlGenerator->getUrl() ]); - return $response; } } @@ -54,9 +53,8 @@ public function imageAction(Request $request): Response if (null !== $feed) { $url = $feed['url'] ?? $feed['urls']['regular'] ?? $feed['urls']['full'] ?? $feed['urls']['raw'] ?? null; } - $response->setData([ - 'url' => '/themes/Rozier/static/assets/img/default_login.jpg' + return $response->setData([ + 'url' => $url ?? '/themes/Rozier/static/assets/img/default_login.jpg' ]); - return $response; } }