diff options
Diffstat (limited to '')
-rw-r--r-- | src/main.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 5ee3b2a..1c5126a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -98,7 +98,19 @@ async fn get_blog(filter_tags: Option<Query<FilterTags>>) -> Result<templates::B #[handler] async fn feed() -> Result<Response> { - let posts = Blogpost::get_articles().await?; + let blogposts: Vec<Box<dyn Post + Send + Sync>> = Blogpost::get_articles() + .await? + .into_iter() + .map(|bp| Box::new(bp) as Box<dyn Post + Send + Sync>) + .collect(); + let poems: Vec<Box<dyn Post + Send + Sync>> = Poem::get_articles() + .await? + .into_iter() + .map(|poem| Box::new(poem) as Box<dyn Post + Send + Sync>) + .collect(); + let mut posts = Vec::new(); + posts.extend(blogposts); + posts.extend(poems); // TODO: i18n let context = atom::Context { page_title: "celeste's hard drive".to_owned(), |