First batch of smart stuff
This commit is contained in:
@@ -11,9 +11,13 @@ pub struct AppState {
|
||||
pub note_repo: Arc<dyn NoteRepository>,
|
||||
pub tag_repo: Arc<dyn TagRepository>,
|
||||
pub user_repo: Arc<dyn UserRepository>,
|
||||
#[cfg(feature = "smart-features")]
|
||||
pub link_repo: Arc<dyn notes_domain::ports::LinkRepository>,
|
||||
pub note_service: Arc<NoteService>,
|
||||
pub tag_service: Arc<TagService>,
|
||||
pub user_service: Arc<UserService>,
|
||||
#[cfg(feature = "smart-features")]
|
||||
pub nats_client: async_nats::Client,
|
||||
pub config: Config,
|
||||
}
|
||||
|
||||
@@ -22,18 +26,24 @@ impl AppState {
|
||||
note_repo: Arc<dyn NoteRepository>,
|
||||
tag_repo: Arc<dyn TagRepository>,
|
||||
user_repo: Arc<dyn UserRepository>,
|
||||
#[cfg(feature = "smart-features")] link_repo: Arc<dyn notes_domain::ports::LinkRepository>,
|
||||
note_service: Arc<NoteService>,
|
||||
tag_service: Arc<TagService>,
|
||||
user_service: Arc<UserService>,
|
||||
#[cfg(feature = "smart-features")] nats_client: async_nats::Client,
|
||||
config: Config,
|
||||
) -> Self {
|
||||
Self {
|
||||
note_repo,
|
||||
tag_repo,
|
||||
user_repo,
|
||||
#[cfg(feature = "smart-features")]
|
||||
link_repo,
|
||||
note_service,
|
||||
tag_service,
|
||||
user_service,
|
||||
#[cfg(feature = "smart-features")]
|
||||
nats_client,
|
||||
config,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user