mirror of
https://github.com/redlib-org/redlib.git
synced 2025-05-17 15:32:53 +00:00
Multireddit Support & Referrer Policy
This commit is contained in:
parent
ef3820a2e1
commit
565f4f23b3
5 changed files with 24 additions and 9 deletions
|
@ -33,7 +33,16 @@ pub async fn render(sub_name: String, sort: Option<String>, ends: (Option<String
|
|||
},
|
||||
};
|
||||
|
||||
let sub_result = subreddit(&sub_name).await;
|
||||
let sub_result = if !&sub_name.contains("+") { subreddit(&sub_name).await } else {
|
||||
Ok(Subreddit {
|
||||
name: String::new(),
|
||||
title: String::new(),
|
||||
description: String::new(),
|
||||
icon: String::new(),
|
||||
members: String::new(),
|
||||
active: String::new(),
|
||||
})
|
||||
};
|
||||
let items_result = fetch_posts(url, String::new()).await;
|
||||
|
||||
if sub_result.is_err() || items_result.is_err() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue