1818 */
1919
2020use crate :: {
21- error:: Error ,
22- routes:: auth:: VERIFICATION_EXPIRATION_DAYS ,
23- utils:: { get_connection, send_email, web_block_unpacked} ,
24- AppState ,
21+ AppState , branding, error:: Error , routes:: auth:: VERIFICATION_EXPIRATION_DAYS , utils:: { get_connection, send_email, web_block_unpacked}
2522} ;
2623use actix_web:: { error:: ErrorConflict , put, web, HttpResponse , Responder } ;
2724use askama:: Template ;
@@ -37,6 +34,7 @@ use validator::Validate;
3734struct EmailChangeNotificationEn {
3835 name : String ,
3936 sender_email : String ,
37+ brand : branding:: Brand ,
4038}
4139
4240#[ allow( unused) ]
@@ -45,6 +43,7 @@ struct EmailChangeNotificationEn {
4543struct EmailChangeNotificationDe {
4644 name : String ,
4745 sender_email : String ,
46+ brand : branding:: Brand ,
4847}
4948
5049#[ allow( unused) ]
@@ -60,6 +59,7 @@ fn send_email_change_notification(
6059 let template = EmailChangeNotificationDe {
6160 name : name. to_string ( ) ,
6261 sender_email : state. sender_email . clone ( ) ,
62+ brand : state. brand ,
6363 } ;
6464 match template. render ( ) {
6565 Ok ( body) => ( body, "E-Mail-Adresse geändert" ) ,
@@ -73,6 +73,7 @@ fn send_email_change_notification(
7373 let template = EmailChangeNotificationEn {
7474 name : name. to_string ( ) ,
7575 sender_email : state. sender_email . clone ( ) ,
76+ brand : state. brand ,
7677 } ;
7778 match template. render ( ) {
7879 Ok ( body) => ( body, "Email address changed" ) ,
@@ -106,6 +107,7 @@ fn send_verification_mail(
106107 "{}/api/auth/verify?id={}" ,
107108 state. frontend_url, verification_id
108109 ) ,
110+ brand : state. brand ,
109111 } ;
110112 match template. render ( ) {
111113 Ok ( body) => ( body, "E-Mail-Adresse bestätigen" ) ,
@@ -124,6 +126,7 @@ fn send_verification_mail(
124126 "{}/api/auth/verify?id={}" ,
125127 state. frontend_url, verification_id
126128 ) ,
129+ brand : state. brand ,
127130 } ;
128131 match template. render ( ) {
129132 Ok ( body) => ( body, "Verify email address" ) ,
0 commit comments