refactor: add hostname to customizations
This commit is contained in:
parent
2774c6e48a
commit
03964d3542
@ -7,6 +7,7 @@ use crate::utils::{ApplicationError, Customization, TemplateResponse};
|
||||
#[template(path = "imprint.html")]
|
||||
struct ImprintTemplate {
|
||||
webmaster_mail: String,
|
||||
hostname: String,
|
||||
}
|
||||
|
||||
#[actix_web::get("/imprint")]
|
||||
@ -15,6 +16,7 @@ pub async fn get_imprint(
|
||||
) -> Result<impl Responder, ApplicationError> {
|
||||
let template = ImprintTemplate {
|
||||
webmaster_mail: customization.webmaster_email.clone(),
|
||||
hostname: customization.hostname.clone(),
|
||||
};
|
||||
|
||||
Ok(template.to_response()?)
|
||||
|
@ -52,6 +52,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
let mailer = Mailer::new(&config)?;
|
||||
let customization = Customization {
|
||||
webmaster_email: config.webmaster_email.clone(),
|
||||
hostname: config.hostname.clone()
|
||||
};
|
||||
|
||||
handle_command(args.command, &pool, &mailer).await?;
|
||||
|
@ -1,4 +1,5 @@
|
||||
#[derive(Clone)]
|
||||
pub struct Customization {
|
||||
pub hostname: String,
|
||||
pub webmaster_email: String,
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ impl DbTestContext {
|
||||
> {
|
||||
let customization = Customization {
|
||||
webmaster_email: self.config.webmaster_email.clone(),
|
||||
hostname: self.config.hostname.clone()
|
||||
};
|
||||
|
||||
init_service(create_app(
|
||||
|
@ -54,7 +54,7 @@
|
||||
</p>
|
||||
<ul>
|
||||
<li>Vor- und Nachname z.B. <code>Max Mustermann</code></li>
|
||||
<li>E-Mail Adresse z.B. <code>max.mustermann@brasiwa-leipzig.de</code></li>
|
||||
<li>E-Mail Adresse z.B. <code>max.mustermann@{{ hostname }}</code></li>
|
||||
<li>Funktion für Brandsicherheitswachen z.B. <code>Wachhabender</code></li>
|
||||
<li>Brandsicherheitswachbereich z.B. <code>Bereich Ost</code></li>
|
||||
<li>Zeitpunkt deines letzten Logins z.B. <code>2021-06-11 09:40:47</code></li>
|
||||
@ -72,6 +72,9 @@
|
||||
</ul>
|
||||
|
||||
<h1>Copyright</h1>
|
||||
<p>Copyright 2025 Max Hohlfeld</p>
|
||||
<p>Brass ist freie Software nach <a href="https://www.gnu.org/licenses/agpl-3.0.en.html#license-text"
|
||||
target="_blank">GNU AGPLv3</a> Lizenz.</p>
|
||||
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user