mirror of
https://github.com/neon-mmd/websurfx.git
synced 2024-11-21 21:48:21 -05:00
Merge branch 'rolling' into CHORE/461_display-the-user-provided-settings-from-the-config-or-the-ui-in-the-settings-page
This commit is contained in:
commit
93afb6b8c9
@ -12,7 +12,9 @@ use std::fs::read_to_string;
|
|||||||
/// Handles the route of index page or main page of the `websurfx` meta search engine website.
|
/// Handles the route of index page or main page of the `websurfx` meta search engine website.
|
||||||
#[get("/")]
|
#[get("/")]
|
||||||
pub async fn index(config: web::Data<Config>) -> Result<HttpResponse, Box<dyn std::error::Error>> {
|
pub async fn index(config: web::Data<Config>) -> Result<HttpResponse, Box<dyn std::error::Error>> {
|
||||||
Ok(HttpResponse::Ok().body(
|
Ok(HttpResponse::Ok()
|
||||||
|
.content_type("text/html; charset=utf-8")
|
||||||
|
.body(
|
||||||
crate::templates::views::index::index(
|
crate::templates::views::index::index(
|
||||||
&config.style.colorscheme,
|
&config.style.colorscheme,
|
||||||
&config.style.theme,
|
&config.style.theme,
|
||||||
@ -52,7 +54,9 @@ pub async fn robots_data(_req: HttpRequest) -> Result<HttpResponse, Box<dyn std:
|
|||||||
/// Handles the route of about page of the `websurfx` meta search engine website.
|
/// Handles the route of about page of the `websurfx` meta search engine website.
|
||||||
#[get("/about")]
|
#[get("/about")]
|
||||||
pub async fn about(config: web::Data<Config>) -> Result<HttpResponse, Box<dyn std::error::Error>> {
|
pub async fn about(config: web::Data<Config>) -> Result<HttpResponse, Box<dyn std::error::Error>> {
|
||||||
Ok(HttpResponse::Ok().body(
|
Ok(HttpResponse::Ok()
|
||||||
|
.content_type("text/html; charset=utf-8")
|
||||||
|
.body(
|
||||||
crate::templates::views::about::about(
|
crate::templates::views::about::about(
|
||||||
&config.style.colorscheme,
|
&config.style.colorscheme,
|
||||||
&config.style.theme,
|
&config.style.theme,
|
||||||
@ -67,7 +71,9 @@ pub async fn about(config: web::Data<Config>) -> Result<HttpResponse, Box<dyn st
|
|||||||
pub async fn settings(
|
pub async fn settings(
|
||||||
config: web::Data<Config>,
|
config: web::Data<Config>,
|
||||||
) -> Result<HttpResponse, Box<dyn std::error::Error>> {
|
) -> Result<HttpResponse, Box<dyn std::error::Error>> {
|
||||||
Ok(HttpResponse::Ok().body(
|
Ok(HttpResponse::Ok()
|
||||||
|
.content_type("text/html; charset=utf-8")
|
||||||
|
.body(
|
||||||
crate::templates::views::settings::settings(
|
crate::templates::views::settings::settings(
|
||||||
config.safe_search,
|
config.safe_search,
|
||||||
&config.style.colorscheme,
|
&config.style.colorscheme,
|
||||||
|
@ -68,7 +68,9 @@ pub async fn search(
|
|||||||
get_results(page + 1)
|
get_results(page + 1)
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok(HttpResponse::Ok().body(
|
Ok(HttpResponse::Ok()
|
||||||
|
.content_type("text/html; charset=utf-8")
|
||||||
|
.body(
|
||||||
crate::templates::views::search::search(
|
crate::templates::views::search::search(
|
||||||
&config.style.colorscheme,
|
&config.style.colorscheme,
|
||||||
&config.style.theme,
|
&config.style.theme,
|
||||||
|
Loading…
Reference in New Issue
Block a user