mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-24 18:10:58 +00:00
Resolve merge conflicts
This commit is contained in:
commit
b2ad2f636c
9 changed files with 57 additions and 70 deletions
|
@ -1,5 +1,5 @@
|
|||
// CRATES
|
||||
use crate::utils::{error, fetch_posts, param, prefs, request, val, Post, Preferences};
|
||||
use crate::utils::{cookie, error, fetch_posts, param, prefs, request, val, Post, Preferences};
|
||||
use actix_web::{HttpRequest, HttpResponse};
|
||||
use askama::Template;
|
||||
|
||||
|
@ -33,7 +33,8 @@ struct SearchTemplate {
|
|||
|
||||
// SERVICES
|
||||
pub async fn find(req: HttpRequest) -> HttpResponse {
|
||||
let path = format!("{}.json?{}", req.path(), req.query_string());
|
||||
let nsfw_results = if cookie(&req, "hide_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();
|
||||
|
||||
let sort = if param(&path, "sort").is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue