mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-24 18:10:58 +00:00
Fix #196
This commit is contained in:
parent
43551f70fd
commit
0656756d21
5 changed files with 11 additions and 7 deletions
|
@ -47,7 +47,7 @@ struct SearchTemplate {
|
|||
// SERVICES
|
||||
pub async fn find(req: Request<Body>) -> Result<Response<Body>, String> {
|
||||
let nsfw_results = if setting(&req, "show_nsfw") == "on" { "&include_over_18=on" } else { "" };
|
||||
let path = format!("{}.json?{}{}", req.uri().path(), req.uri().query().unwrap_or_default(), nsfw_results);
|
||||
let path = format!("{}.json?{}{}&raw_json=1", req.uri().path(), req.uri().query().unwrap_or_default(), nsfw_results);
|
||||
let query = param(&path, "q").unwrap_or_default();
|
||||
|
||||
if query.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue