Skip to content

Commit

Permalink
Adjust after review
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd committed Feb 2, 2024
1 parent d381f14 commit 46bca85
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Http\Client\Curl\Client;
use Nyholm\Psr7\Factory\Psr17Factory;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;

Expand All @@ -21,13 +22,14 @@ final class DefaultController extends AbstractController
private readonly string $path;

public function __construct(
ContainerBagInterface $parameters,
private readonly ContributorsUrlFactory $contributorsUrlFactory
) {
$this->path = __DIR__ . '/../../../../var/data/latest_contributors.json';
$this->path = $parameters->get('kernel.cache_dir') . '/data/latest_contributors.json';
}

#[Route('/', name: 'main')]
public function __invoke() : Response
public function main() : Response
{
$factory = new Psr17Factory();
$client = new Client($factory, $factory);
Expand Down

0 comments on commit 46bca85

Please sign in to comment.