collapse 20 pass-through use cases; handlers call ports directly
delete get/list/list_by_owner channels, get_settings/activity_log admin, get_item/get_sync_status/list_collections/list_seasons/list_shows/list_genres library, get/list/delete providers, get/list/patch_label config_snapshots, get_active/list_history/delete_after schedule — all single-delegation. remove ChannelQueryDeps, LibraryQueryDeps, deleted query/command structs. add direct port fields to AppState. update MCP crate accordingly.
This commit is contained in:
@@ -3,11 +3,11 @@ use std::sync::Arc;
|
||||
use application::{
|
||||
admin::AdminDeps,
|
||||
auth::AuthDeps,
|
||||
channels::{ChannelCommandDeps, ChannelQueryDeps},
|
||||
channels::ChannelCommandDeps,
|
||||
config::ConfigDeps,
|
||||
config_snapshots::ConfigSnapshotDeps,
|
||||
iptv::IptvDeps,
|
||||
library::{LibraryCommandDeps, LibraryQueryDeps},
|
||||
library::LibraryCommandDeps,
|
||||
providers::ProviderDeps,
|
||||
schedule::ScheduleDeps,
|
||||
};
|
||||
@@ -73,10 +73,6 @@ pub async fn build_app_state(config: Config) -> anyhow::Result<AppState> {
|
||||
event_publisher: event_publisher.clone(),
|
||||
});
|
||||
|
||||
let channel_query_deps = Arc::new(ChannelQueryDeps {
|
||||
channel_query: wire_output.channel_query.clone(),
|
||||
});
|
||||
|
||||
let config_snapshot_deps = Arc::new(ConfigSnapshotDeps {
|
||||
channel_command: wire_output.channel_command.clone(),
|
||||
channel_query: wire_output.channel_query.clone(),
|
||||
@@ -99,10 +95,6 @@ pub async fn build_app_state(config: Config) -> anyhow::Result<AppState> {
|
||||
event_publisher: event_publisher.clone(),
|
||||
});
|
||||
|
||||
let library_query_deps = Arc::new(LibraryQueryDeps {
|
||||
library_query: wire_output.library_query.clone(),
|
||||
});
|
||||
|
||||
let admin_deps = Arc::new(AdminDeps {
|
||||
settings_repo: wire_output.settings.clone(),
|
||||
activity_query: wire_output.activity_query.clone(),
|
||||
@@ -163,19 +155,23 @@ pub async fn build_app_state(config: Config) -> anyhow::Result<AppState> {
|
||||
Ok(AppState {
|
||||
auth_deps,
|
||||
channel_command_deps,
|
||||
channel_query_deps,
|
||||
config_snapshot_deps,
|
||||
config_deps,
|
||||
schedule_deps,
|
||||
library_command_deps,
|
||||
library_query_deps,
|
||||
admin_deps,
|
||||
iptv_deps,
|
||||
provider_deps,
|
||||
channel_query: wire_output.channel_query.clone(),
|
||||
library_query: wire_output.library_query.clone(),
|
||||
schedule_query: wire_output.schedule_query.clone(),
|
||||
settings_repo: wire_output.settings.clone(),
|
||||
activity_query: wire_output.activity_query.clone(),
|
||||
provider_config_query: wire_output.provider_config_query.clone(),
|
||||
provider_config_command: wire_output.provider_config_command.clone(),
|
||||
#[cfg(feature = "auth-jwt")]
|
||||
jwt_validator,
|
||||
_library_sync: library_sync,
|
||||
_settings_repo: wire_output.settings,
|
||||
_event_bus: event_bus,
|
||||
config: config_arc,
|
||||
_sync_trigger: sync_tx,
|
||||
|
||||
Reference in New Issue
Block a user