1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-24 23:01:05 +03:00

Make the template contexts a bit more clear

This commit is contained in:
Quentin Gliech
2021-09-17 14:30:06 +02:00
parent 7afd82be8f
commit 463184bbb1
4 changed files with 30 additions and 17 deletions

View File

@@ -27,7 +27,7 @@ use crate::{
with_templates, CsrfToken,
},
storage::SessionInfo,
templates::{TemplateContext, Templates},
templates::{EmptyContext, TemplateContext, Templates},
};
#[derive(Deserialize, Debug)]
@@ -63,7 +63,7 @@ async fn get(
csrf_token: CsrfToken,
session: SessionInfo,
) -> Result<impl Reply, Rejection> {
let ctx = ().with_session(session).with_csrf(&csrf_token);
let ctx = EmptyContext.with_session(session).with_csrf(&csrf_token);
let content = templates.render_reauth(&ctx)?;
let reply = html(content);