Simplify redirect path
This commit is contained in:
parent
f14639ee00
commit
a301f1ecb6
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ pub async fn subscriptions(req: HttpRequest) -> HttpResponse {
|
||||||
|
|
||||||
// Redirect back to subreddit
|
// Redirect back to subreddit
|
||||||
// check for redirect parameter if unsubscribing from outside sidebar
|
// check for redirect parameter if unsubscribing from outside sidebar
|
||||||
let redirect_path = param(&format!("{}?{}", req.path(), req.query_string()), "redirect");
|
let redirect_path = param(&req.uri().to_string(), "redirect");
|
||||||
let path;
|
let path;
|
||||||
|
|
||||||
if redirect_path.len() > 1 && redirect_path.chars().nth(0).unwrap() == '/' {
|
if redirect_path.len() > 1 && redirect_path.chars().nth(0).unwrap() == '/' {
|
||||||
|
|
Loading…
Reference in a new issue