Browse Source

Show latest

imwald
Nuša Pukšič 2 weeks ago
parent
commit
3ba014a5af
  1. 2
      src/Controller/ArticleController.php

2
src/Controller/ArticleController.php

@ -138,7 +138,7 @@ class ArticleController extends AbstractController @@ -138,7 +138,7 @@ class ArticleController extends AbstractController
$key = new Key();
$pubkey = $key->convertToHex($npub);
$repository = $entityManager->getRepository(Article::class);
$article = $repository->findOneBy(['slug' => $slug, 'pubkey' => $pubkey]);
$article = $repository->findOneBy(['slug' => $slug, 'pubkey' => $pubkey], ['createdAt' => 'DESC']);
if (!$article) {
throw $this->createNotFoundException('The article could not be found');
}

Loading…
Cancel
Save