Implemented mail notifications.
This commit is contained in:
+3
-2
@@ -51,9 +51,10 @@ async fn main() -> std::io::Result<()> {
|
||||
let pool = PgPoolOptions::new()
|
||||
.max_connections(10)
|
||||
.connect(&srv_conf.database().con_string()).await.unwrap();
|
||||
|
||||
migrate!().run(&pool).await.expect("could not run SQLx migrations");
|
||||
|
||||
let mailing = srv_conf.mailing().clone();
|
||||
|
||||
if let Err(e) = create_admin(&pool).await {
|
||||
error!("Error while checking admin user: {:?}", e);
|
||||
}
|
||||
@@ -69,7 +70,7 @@ async fn main() -> std::io::Result<()> {
|
||||
let site_root = &leptos_options.site_root;
|
||||
|
||||
App::new()
|
||||
.app_data(Data::new(AppData::new(pool.clone())))
|
||||
.app_data(Data::new(AppData::new(pool.clone(), mailing.clone())))
|
||||
.wrap(Authentication)
|
||||
.wrap(SessionMiddleware::new(
|
||||
CookieSessionStore::default(),
|
||||
|
||||
Reference in New Issue
Block a user