feat: token authentication (#3927)

This commit is contained in:
Dag 2024-01-25 18:20:02 +01:00 committed by GitHub
parent d08d13f2c8
commit e58c867a82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 95 additions and 138 deletions

View file

@ -4,8 +4,6 @@ final class FrontpageAction implements ActionInterface
{
public function execute(Request $request)
{
$showInactive = (bool) $request->get('show_inactive');
$messages = [];
$activeBridges = 0;
@ -22,10 +20,8 @@ final class FrontpageAction implements ActionInterface
$body = '';
foreach ($bridgeClassNames as $bridgeClassName) {
if ($bridgeFactory->isEnabled($bridgeClassName)) {
$body .= BridgeCard::render($bridgeClassName);
$body .= BridgeCard::render($bridgeClassName, $request);
$activeBridges++;
} elseif ($showInactive) {
$body .= BridgeCard::render($bridgeClassName, false) . "\n";
}
}
@ -37,7 +33,6 @@ final class FrontpageAction implements ActionInterface
'bridges' => $body,
'active_bridges' => $activeBridges,
'total_bridges' => count($bridgeClassNames),
'show_inactive' => $showInactive,
]);
}
}