mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-25 02:41:27 +01:00
refactoring: new structure and mailer
This commit is contained in:
@@ -19,17 +19,20 @@ use zettle_db::{
|
||||
server::{
|
||||
middleware_api_auth::api_auth,
|
||||
routes::{
|
||||
auth::{show_signup_form, signup_handler},
|
||||
file::upload_handler,
|
||||
index::index_handler,
|
||||
ingress::ingress_handler,
|
||||
query::query_handler,
|
||||
queue_length::queue_length_handler,
|
||||
search_result::search_result_handler,
|
||||
api::{
|
||||
file::upload_handler, ingress::ingress_handler, query::query_handler,
|
||||
queue_length::queue_length_handler,
|
||||
},
|
||||
html::{
|
||||
auth::{show_signup_form, signup_handler},
|
||||
index::index_handler,
|
||||
search_result::search_result_handler,
|
||||
},
|
||||
},
|
||||
AppState,
|
||||
},
|
||||
storage::{db::SurrealDbClient, types::user::User},
|
||||
utils::mailer::Mailer,
|
||||
};
|
||||
|
||||
#[tokio::main(flavor = "multi_thread", worker_threads = 2)]
|
||||
@@ -59,6 +62,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
Ok(env)
|
||||
});
|
||||
|
||||
let mailer = Mailer::new();
|
||||
|
||||
let app_state = AppState {
|
||||
rabbitmq_producer: Arc::new(RabbitMQProducer::new(&config).await?),
|
||||
rabbitmq_consumer: Arc::new(RabbitMQConsumer::new(&config, false).await?),
|
||||
|
||||
Reference in New Issue
Block a user