Add Matrix authentication token form

This commit is contained in:
2025-01-22 21:35:38 +01:00
parent d133513daf
commit 6b2587648c
3 changed files with 55 additions and 2 deletions

View File

@ -31,6 +31,7 @@ pub async fn static_file(path: web::Path<String>) -> HttpResult {
#[template(path = "index.html")]
struct HomeTemplate {
name: String,
matrix_token: String,
}
/// Main route
@ -55,7 +56,14 @@ pub async fn home(session: Session) -> HttpResult {
Ok(HttpResponse::Ok()
.insert_header(("content-type", "text/html"))
.body(HomeTemplate { name: user.name }.render().unwrap()))
.body(
HomeTemplate {
name: user.name,
matrix_token: "TODO".to_string(),
}
.render()
.unwrap(),
))
}
#[derive(serde::Deserialize)]