feat: customization for imprint
This commit is contained in:
parent
fe2f616bea
commit
bce103b086
@ -1,15 +1,21 @@
|
|||||||
use actix_web::Responder;
|
use actix_web::{web, Responder};
|
||||||
use askama::Template;
|
use askama::Template;
|
||||||
|
|
||||||
use crate::utils::{ApplicationError, TemplateResponse};
|
use crate::utils::{ApplicationError, Customization, TemplateResponse};
|
||||||
|
|
||||||
#[derive(Template)]
|
#[derive(Template)]
|
||||||
#[template(path = "imprint.html")]
|
#[template(path = "imprint.html")]
|
||||||
struct ImprintTemplate {}
|
struct ImprintTemplate {
|
||||||
|
webmaster_mail: String,
|
||||||
|
}
|
||||||
|
|
||||||
#[actix_web::get("/imprint")]
|
#[actix_web::get("/imprint")]
|
||||||
pub async fn get_imprint() -> Result<impl Responder, ApplicationError> {
|
pub async fn get_imprint(
|
||||||
let template = ImprintTemplate {};
|
customization: web::Data<Customization>,
|
||||||
|
) -> Result<impl Responder, ApplicationError> {
|
||||||
|
let template = ImprintTemplate {
|
||||||
|
webmaster_mail: customization.webmaster_email.clone(),
|
||||||
|
};
|
||||||
|
|
||||||
Ok(template.to_response()?)
|
Ok(template.to_response()?)
|
||||||
}
|
}
|
||||||
|
@ -18,13 +18,13 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
E-Mail: max.hohlfeld@brasiwa-leipzig.de
|
E-Mail: {{ webmaster_mail }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1>Datenschutzerklärung</h1>
|
<h1>Datenschutzerklärung</h1>
|
||||||
<h3>Name und Kontaktdaten des Verantwortlichen</h3>
|
<h3>Name und Kontaktdaten des Verantwortlichen</h3>
|
||||||
<p> Kamerad Max Hohlfeld </p>
|
<p>Kamerad Max Hohlfeld</p>
|
||||||
<p> E-Mail: max.hohlfeld@brasiwa-leipzig.de </p>
|
<p>E-Mail: {{ webmaster_mail }}</p>
|
||||||
|
|
||||||
<h3>Erhobene Daten</h3>
|
<h3>Erhobene Daten</h3>
|
||||||
<p>
|
<p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user