Skip to content

Commit

Permalink
fix: LoginController.php with random images
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Mar 8, 2024
1 parent e96a763 commit 032e68e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/Rozier/src/Controllers/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand All @@ -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;
}
}

0 comments on commit 032e68e

Please sign in to comment.