My personal site
cherry.computer
htmx
tailwind
axum
askama
1use askama::Template;
2
3use crate::scrapers::apple_music::AppleMusicClient;
4
5#[derive(Template, Debug, Clone)]
6#[template(path = "am-auth-flow.html")]
7pub struct AuthFlowTemplate {
8 token: String,
9}
10
11impl AuthFlowTemplate {
12 pub fn new(apple_music_client: &AppleMusicClient) -> anyhow::Result<Self> {
13 let token = apple_music_client.build_developer_token()?;
14 Ok(Self { token })
15 }
16}