use shuttle_runtime::SecretStore;

#[shuttle_runtime::main]
#[allow(clippy::unused_async)]
async fn main(#[shuttle_runtime::Secrets] secrets: SecretStore) -> shuttle_axum::ShuttleAxum {
    #[allow(clippy::expect_used)]
    let smtp_config = digitaler_frieden::config::SMTPConfig::new(
        &secrets.get("SMTP_MAIL").expect("SMTP_MAIL not set"),
        &secrets.get("SMTP_SECRET").expect("SMTP_SECRET not set"),
    );
    let router = digitaler_frieden::new(smtp_config);
    Ok(router.into())
}