Merge branch 'rolling' into FIX/463_results_from_different_search_engines_get_cached_as_the_same_key
This commit is contained in:
commit
36e2ac93be
13 changed files with 206 additions and 77 deletions
|
@ -11,7 +11,7 @@ use crate::{
|
|||
},
|
||||
results::aggregator::aggregate,
|
||||
};
|
||||
use actix_web::{get, web, HttpRequest, HttpResponse};
|
||||
use actix_web::{get, http::header::ContentType, web, HttpRequest, HttpResponse};
|
||||
use regex::Regex;
|
||||
use std::{
|
||||
fs::File,
|
||||
|
@ -68,18 +68,16 @@ pub async fn search(
|
|||
get_results(page + 1)
|
||||
);
|
||||
|
||||
Ok(HttpResponse::Ok()
|
||||
.content_type("text/html; charset=utf-8")
|
||||
.body(
|
||||
crate::templates::views::search::search(
|
||||
&config.style.colorscheme,
|
||||
&config.style.theme,
|
||||
&config.style.animation,
|
||||
query,
|
||||
&results?,
|
||||
)
|
||||
.0,
|
||||
))
|
||||
Ok(HttpResponse::Ok().content_type(ContentType::html()).body(
|
||||
crate::templates::views::search::search(
|
||||
&config.style.colorscheme,
|
||||
&config.style.theme,
|
||||
&config.style.animation,
|
||||
query,
|
||||
&results?,
|
||||
)
|
||||
.0,
|
||||
))
|
||||
}
|
||||
None => Ok(HttpResponse::TemporaryRedirect()
|
||||
.insert_header(("location", "/"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue