diff --git a/Cargo.toml b/Cargo.toml index 3109633..e661384 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,4 +16,3 @@ serde = { version = "1.0", features = [ "derive" ]} serde_json = "1.0" chrono = { version = "0.4", features = ["serde"]} tera = { version = "1.18", features = ["date-locale"]} -rss = "2.0" diff --git a/src/model/log.rs b/src/model/log.rs index 80bab9a..3e69659 100644 --- a/src/model/log.rs +++ b/src/model/log.rs @@ -32,17 +32,16 @@ LIMIT 1000 } pub async fn generate_feed(db: &SqlitePool) -> String { - let mut channel = ChannelBuilder::default() - .title("Ruder App Admin Feed") - .description("An RSS feed with activities from app.rudernlinz.at") - .build(); - let mut items: Vec = vec![]; + let mut ret = String::from(" + + + Ruder App Admin Feed + An RSS feed with activities from app.rudernlinz.at"); for log in Self::last(db).await { - let mut item = Item::default(); - item.set_title(format!("({}) {}", log.created_at, log.msg)); - items.append(&mut vec![item]); + ret.push_str(""); + ret.push_str(&format!("({}) {}", log.created_at, log.msg)); + ret.push_str(""); } - channel.set_items(items); - channel.to_string() + ret } }