mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-08 07:37:45 +00:00
Categorize utilities
This commit is contained in:
parent
83ba0fb913
commit
a3ec44149c
6 changed files with 260 additions and 263 deletions
|
@ -25,7 +25,7 @@ pub async fn profile(req: Request<()>) -> tide::Result {
|
|||
let username = req.param("name").unwrap_or("").to_string();
|
||||
|
||||
// Request user posts/comments from Reddit
|
||||
let posts = fetch_posts(&path, "Comment".to_string()).await;
|
||||
let posts = Post::fetch(&path, "Comment".to_string()).await;
|
||||
|
||||
match posts {
|
||||
Ok((posts, after)) => {
|
||||
|
@ -37,7 +37,7 @@ pub async fn profile(req: Request<()>) -> tide::Result {
|
|||
posts,
|
||||
sort: (sort, param(&path, "t")),
|
||||
ends: (param(&path, "after"), after),
|
||||
prefs: prefs(req),
|
||||
prefs: Preferences::new(req),
|
||||
})
|
||||
}
|
||||
// If there is an error show error page
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue