mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-24 18:10:58 +00:00
Experiment with caching
This commit is contained in:
parent
baf7272cfd
commit
077c222a4e
7 changed files with 108 additions and 8 deletions
|
@ -75,7 +75,7 @@ async fn search_subreddits(q: String) -> Vec<Subreddit> {
|
|||
let subreddit_search_path = format!("/subreddits/search.json?q={}&limit=3", q.replace(' ', "+"));
|
||||
|
||||
// Send a request to the url
|
||||
match request(&subreddit_search_path).await {
|
||||
match request(subreddit_search_path).await {
|
||||
// If success, receive JSON in response
|
||||
Ok(response) => {
|
||||
match response["data"]["children"].as_array() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue