add own index html

This commit is contained in:
JMARyA 2023-12-07 13:54:35 +01:00
parent b724236671
commit 6b16402126
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 3 additions and 4 deletions

View file

@ -13,10 +13,7 @@ async fn gotify_notification(msg: &str, title: &str, config: config::GotifySetti
info!("Sending gotify notification");
let c = reqwest::Client::new();
let _ = c
.post(format!(
"https://{}/message?token={}",
config.host, config.token
))
.post(format!("https://{}/message?token={}", config.host, config.token))
.header("title", title)
.header("message", msg)
.header("priority", 5)

View file

@ -187,10 +187,12 @@ pub(crate) async fn index(conf: web::Data<config::Config>, r: HttpRequest) -> im
let information_block = build_information_block(&conf);
let contact_block = build_contact_block(&conf);
let donation_block = build_donation_block(&conf);
let own_index = std::fs::read_to_string("./config/index.html").unwrap_or_default();
let content = format!(
"
{information_block}
{contact_block}
{own_index}
{donation_block}
"
);