Fixed UI
This commit is contained in:
@@ -53,6 +53,12 @@ pub fn build_router(root: PathBuf, token: String, oidc: Option<Arc<OidcState>>)
|
||||
.with_state(state)
|
||||
}
|
||||
|
||||
async fn player_html() -> axum::response::Html<&'static str> {
|
||||
axum::response::Html(include_str!("player.html"))
|
||||
#[derive(Clone)]
|
||||
pub struct AuthUserInfo(pub String);
|
||||
|
||||
async fn player_html(
|
||||
axum::extract::Extension(user_info): axum::extract::Extension<AuthUserInfo>,
|
||||
) -> axum::response::Html<String> {
|
||||
let html = include_str!("player.html").replace("<!-- USERNAME_PLACEHOLDER -->", &user_info.0);
|
||||
axum::response::Html(html)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user