From d47c536f973f48d35081c4dbbfbd2b13394d9aa7 Mon Sep 17 00:00:00 2001 From: Vika Date: Wed, 27 Jul 2022 11:14:04 +0300 Subject: kittybox-templates: split out MF2 rendering and get rid of log crate Kittybox now uses tracing instead of log. Why would I keep an unneccesary dependency in my Cargo.lock? --- kittybox-rs/src/frontend/mod.rs | 6 ------ kittybox-rs/src/frontend/onboarding.rs | 4 +--- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'kittybox-rs/src/frontend') diff --git a/kittybox-rs/src/frontend/mod.rs b/kittybox-rs/src/frontend/mod.rs index bc9925f..00d3ba6 100644 --- a/kittybox-rs/src/frontend/mod.rs +++ b/kittybox-rs/src/frontend/mod.rs @@ -14,8 +14,6 @@ pub mod onboarding; use kittybox_templates::{Entry, ErrorPage, Feed, MainPage, Template, VCard, POSTS_PER_PAGE}; -pub use kittybox_util::IndiewebEndpoints; - #[derive(Debug, Deserialize)] pub struct QueryParams { after: Option, @@ -143,7 +141,6 @@ pub async fn homepage( Template { title: &blogname, blog_name: &blogname, - endpoints: None, // XXX this will be deprecated soon anyway feeds: channels, user, content: MainPage { @@ -182,7 +179,6 @@ pub async fn homepage( Template { title: &blogname, blog_name: &blogname, - endpoints: None, // XXX this will be deprecated soon anyway feeds: channels, user, content: ErrorPage { @@ -228,7 +224,6 @@ pub async fn catchall( Template { title: &blogname, blog_name: &blogname, - endpoints: None, // XXX this will be deprecated soon anyway feeds: channels, user, content: match post.pointer("/type/0").and_then(|i| i.as_str()) { @@ -258,7 +253,6 @@ pub async fn catchall( Template { title: &blogname, blog_name: &blogname, - endpoints: None, feeds: channels, user, content: ErrorPage { diff --git a/kittybox-rs/src/frontend/onboarding.rs b/kittybox-rs/src/frontend/onboarding.rs index e9eceb2..b498aed 100644 --- a/kittybox-rs/src/frontend/onboarding.rs +++ b/kittybox-rs/src/frontend/onboarding.rs @@ -17,7 +17,6 @@ pub async fn get() -> Html { title: "Kittybox - Onboarding", blog_name: "Kittybox", feeds: vec![], - endpoints: None, user: None, content: OnboardingPage {}.to_string(), } @@ -83,7 +82,7 @@ async fn onboard( if feed.name.is_empty() || feed.slug.is_empty() { continue; }; - log::debug!("Creating feed {} with slug {}", &feed.name, &feed.slug); + debug!("Creating feed {} with slug {}", &feed.name, &feed.slug); let (_, feed) = crate::micropub::normalize_mf2( serde_json::json!({ "type": ["h-feed"], @@ -130,7 +129,6 @@ pub async fn post( title: "Kittybox - Onboarding", blog_name: "Kittybox", feeds: vec![], - endpoints: None, user: None, content: ErrorPage { code: err.code(), -- cgit 1.4.1