Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
1ma committed Apr 16, 2024
1 parent d603d74 commit e715a5e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions frontend/web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@

$twig->getEnvironment()->addGlobal('chain', $chain = stream_get_line($fh, 16, "\n"));

$response = $handler->handle(
$request
->withAttribute('grouphug_conn', $fh)
->withAttribute('grouphug_chain', $chain)
);
$response = $handler->handle($request->withAttribute('grouphug_conn', $fh));

stream_socket_shutdown($fh, \STREAM_SHUT_RDWR);
fclose($fh);
Expand All @@ -47,7 +43,7 @@
});

$app->get('/', function (ServerRequestInterface $request, ResponseInterface $response) use ($twig) {
return $twig->render($response, 'index.html.twig', ['chain' => $request->getAttribute('grouphug_chain')]);
return $twig->render($response, 'index.html.twig');
});

$app->post('/', function (ServerRequestInterface $request, ResponseInterface $response) use ($twig) {
Expand Down

0 comments on commit e715a5e

Please sign in to comment.