application: config_snapshots, admin, providers, iptv
This commit is contained in:
17
crates/application/src/config_snapshots/get.rs
Normal file
17
crates/application/src/config_snapshots/get.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
use domain::models::ChannelConfigSnapshot;
|
||||
use domain::value_objects::ChannelId;
|
||||
use domain::DomainResult;
|
||||
|
||||
use super::deps::ConfigSnapshotDeps;
|
||||
use super::queries::GetSnapshotQuery;
|
||||
|
||||
/// Get a specific config snapshot by channel and snapshot ID.
|
||||
pub async fn execute(
|
||||
deps: &ConfigSnapshotDeps,
|
||||
query: GetSnapshotQuery,
|
||||
) -> DomainResult<Option<ChannelConfigSnapshot>> {
|
||||
let channel_id = ChannelId::from(query.channel_id);
|
||||
deps.channel_query
|
||||
.get_config_snapshot(channel_id, query.snapshot_id)
|
||||
.await
|
||||
}
|
||||
Reference in New Issue
Block a user