From bb00d178d77ee6ca604cd4c6ed2c4e3ba81aab64 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Wed, 2 Apr 2025 03:37:07 +0100 Subject: order poems by published_at --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 8e31fee..ebc480e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -180,7 +180,7 @@ async fn get_poem(Path(poem): Path, locale: Locale) -> Result Result { let mut poems = Poem::get_articles().await?; - poems.sort_by_key(|poem| poem.created_at); + poems.sort_by_key(|poem| poem.published_at); poems.reverse(); Ok(templates::Poetry { title: locale.text("title-poetry").unwrap(), -- cgit