From 3ba014a5af713c53fe83071cc17b2b8af9fdaf5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nu=C5=A1a=20Puk=C5=A1i=C4=8D?= Date: Thu, 1 Jan 2026 14:17:39 +0100 Subject: [PATCH] Show latest --- src/Controller/ArticleController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/ArticleController.php b/src/Controller/ArticleController.php index 027c784..bcc3bd2 100644 --- a/src/Controller/ArticleController.php +++ b/src/Controller/ArticleController.php @@ -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'); }