aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2023-06-21 19:32:30 +0100
committerLibravatar cel 🌸 <cel@blos.sm>2023-06-21 19:32:30 +0100
commit14db008af73d25cc92ea6c0b1f3b1e0ef67920d1 (patch)
treebe9eecf46dd7dc01686e26b88e27f98d8e9c7fdd /src/main.rs
parente0cd7838c350cb9814d8285cad04648f32b3db59 (diff)
downloadblossom-14db008af73d25cc92ea6c0b1f3b1e0ef67920d1.tar.gz
blossom-14db008af73d25cc92ea6c0b1f3b1e0ef67920d1.tar.bz2
blossom-14db008af73d25cc92ea6c0b1f3b1e0ef67920d1.zip
implement foundation for posts
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index 57d4973..dd2bd34 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -26,20 +26,23 @@ extern crate rocket;
#[get("/")]
async fn home(clients: &State<Clients>) -> Template {
- let (live, listenbrainz, skweets) = tokio::join!(
+ let (live, listenbrainz, skweets, blogposts) = tokio::join!(
live::get_live_status(&clients.reqwest),
scrobbles::get_now_playing(&clients.listenbrainz),
- skweets::get_recents(&clients.skinnyverse)
+ skweets::get_recents(&clients.skinnyverse),
+ posts::get_blogposts()
);
let is_live = live.unwrap_or_default().online;
let listenbrainz = listenbrainz.unwrap_or_default();
let skweets = skweets.unwrap_or_default();
+ let blogposts = blogposts.unwrap_or_default();
Template::render(
"home",
context! {
- is_live,
- listenbrainz,
- skweets,
+ is_live,
+ listenbrainz,
+ skweets,
+ blogposts,
},
)
}