use crate::bootstrap::state::AppState;
use shared::{BackupDestination, Response};
pub async fn handle(state: AppState, destination: Option<BackupDestination>) -> Response {
match crate::features::data_backup::destination::test(&state.db, &state.secrets, destination)
.await
{
Ok(()) => Response::Ok,
Err(e) => Response::err("BackupDestinationTestFailed", format!("{e:#}")),
}
}