application: config_snapshots, admin, providers, iptv

This commit is contained in:
2026-07-12 02:14:07 +02:00
parent ebf0614fdf
commit 466d34b5d0
37 changed files with 895 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
use domain::DomainResult;
use super::commands::UpdateSettingsCommand;
use super::deps::AdminDeps;
/// Update one or more admin settings.
///
/// Iterates key/value pairs and upserts each one.
pub async fn execute(deps: &AdminDeps, cmd: UpdateSettingsCommand) -> DomainResult<()> {
for (key, value) in &cmd.settings {
deps.settings_repo.set(key, value).await?;
}
Ok(())
}
#[cfg(test)]
#[path = "tests/update_settings.rs"]
mod tests;