diff --git a/src/main.rs b/src/main.rs index a5ced89..d8a7d05 100644 --- a/src/main.rs +++ b/src/main.rs @@ -323,12 +323,12 @@ async fn main() { .at("/r/u_:name") .get(|r| async move { Ok(redirect(&format!("/user/{}", r.param("name").unwrap_or_default()))) }.boxed()); - app.at("/r/:sub/subscribe").post(|r| subreddit::subscriptions_filters(r).boxed()); - app.at("/r/:sub/unsubscribe").post(|r| subreddit::subscriptions_filters(r).boxed()); - app.at("/r/:sub/filter").post(|r| subreddit::subscriptions_filters(r).boxed()); - app.at("/r/:sub/unfilter").post(|r| subreddit::subscriptions_filters(r).boxed()); - app.at("/r/:sub/quicklist").post(|r| subreddit::subscriptions_filters(r).boxed()); - app.at("/r/:sub/unquicklist").post(|r| subreddit::subscriptions_filters(r).boxed()); + app.at("/r/:sub/subscribe").post(|r| subreddit::subscriptions_filters_quicklists(r).boxed()); + app.at("/r/:sub/unsubscribe").post(|r| subreddit::subscriptions_filters_quicklists(r).boxed()); + app.at("/r/:sub/filter").post(|r| subreddit::subscriptions_filters_quicklists(r).boxed()); + app.at("/r/:sub/unfilter").post(|r| subreddit::subscriptions_filters_quicklists(r).boxed()); + app.at("/r/:sub/quicklist").post(|r| subreddit::subscriptions_filters_quicklists(r).boxed()); + app.at("/r/:sub/unquicklist").post(|r| subreddit::subscriptions_filters_quicklists(r).boxed()); app.at("/r/:sub/comments/:id").get(|r| post::item(r).boxed()); app.at("/r/:sub/comments/:id/:title").get(|r| post::item(r).boxed()); diff --git a/src/subreddit.rs b/src/subreddit.rs index 759aaea..5f964ef 100644 --- a/src/subreddit.rs +++ b/src/subreddit.rs @@ -211,8 +211,8 @@ pub fn can_access_quarantine(req: &Request
, sub: &str) -> bool { setting(req, &format!("allow_quaran_{}", sub.to_lowercase())).parse().unwrap_or_default() } -// Sub, filter, unfilter, or unsub by setting subscription cookie using response "Set-Cookie" header -pub async fn subscriptions_filters(req: Request) -> Resultr/{{ sub.name }}
+ {% if crate::utils::enable_rss() %} + + + + {% endif %}{{ sub.description }}
u/{{ user.name }}
+ {% if crate::utils::enable_rss() %} + + + + {% endif %}