Add Matrix authentication token form
This commit is contained in:
@ -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)]
|
||||
|
Reference in New Issue
Block a user