mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-08 07:37:45 +00:00
Fix wiki routing
This commit is contained in:
parent
0ce2d9054e
commit
a81502dde1
3 changed files with 27 additions and 16 deletions
|
@ -21,7 +21,11 @@ struct UserTemplate {
|
|||
// FUNCTIONS
|
||||
pub async fn profile(req: Request<Body>) -> Result<Response<Body>, String> {
|
||||
// Build the Reddit JSON API path
|
||||
let path = format!("{}.json?{}&raw_json=1", req.uri().path(), req.uri().query().unwrap_or_default());
|
||||
let path = format!(
|
||||
"/user/{}.json?{}&raw_json=1",
|
||||
req.param("name").unwrap_or("reddit".to_string()),
|
||||
req.uri().query().unwrap_or_default()
|
||||
);
|
||||
|
||||
// Retrieve other variables from Libreddit request
|
||||
let sort = param(&path, "sort");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue