mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-24 18:10:58 +00:00
Hide NSFW content by default
This commit is contained in:
parent
79027c4c75
commit
1653d4fb4c
7 changed files with 12 additions and 12 deletions
|
@ -33,7 +33,7 @@ struct SearchTemplate {
|
|||
|
||||
// SERVICES
|
||||
pub async fn find(req: HttpRequest) -> HttpResponse {
|
||||
let nsfw_results = if cookie(&req, "hide_nsfw") != "on" { "&include_over_18=on" } else { "" };
|
||||
let nsfw_results = if cookie(&req, "show_nsfw") == "on" { "&include_over_18=on" } else { "" };
|
||||
let path = format!("{}.json?{}{}", req.path(), req.query_string(), nsfw_results);
|
||||
let sub = req.match_info().get("sub").unwrap_or("").to_string();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue