My personal site cherry.computer
htmx tailwind axum askama

feat: configure AM auth key file path by env var

cherry.computer 8bb7bb95 50e36a46

verified
+3 -1
+3 -1
server/src/scrapers/apple_music.rs
··· 72 72 env::var("APPLE_DEVELOPER_TOKEN_KEY_ID").context("missing apple developer key ID")?; 73 73 let team_id = 74 74 env::var("APPLE_DEVELOPER_TOKEN_TEAM_ID").context("missing apple developer team ID")?; 75 - let auth_key = fs::read("keys/AuthKey.p8").context("missing apple developer auth key")?; 75 + let auth_key_path = env::var("APPLE_DEVELOPER_AUTH_KEY_PATH") 76 + .context("missing apple developer apple developer auth key path")?; 77 + let auth_key = fs::read(auth_key_path).context("missing apple developer auth key")?; 76 78 let key = EncodingKey::from_ec_pem(&auth_key) 77 79 .context("failed to parse apple developer auth key")?; 78 80 let user_token = env::var("APPLE_USER_TOKEN").context("missing apple user token")?;