1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

template: more cleanups

This commit is contained in:
Quentin Gliech
2022-12-08 14:43:46 +01:00
parent 13b1ac7c83
commit 0ea9089f7f
10 changed files with 79 additions and 93 deletions

View File

@@ -163,7 +163,7 @@ pub(crate) async fn get(
(Some(user_session), None) => {
// Session not linked, but user logged in: suggest linking account
let ctx = UpstreamSuggestLink::new(link.id)
let ctx = UpstreamSuggestLink::new(&link)
.with_session(user_session)
.with_csrf(csrf_token.form_value());
@@ -182,7 +182,7 @@ pub(crate) async fn get(
(None, None) => {
// Session not linked and used not logged in: suggest creating an
// account or logging in an existing user
let ctx = UpstreamRegister::new(link.id).with_csrf(csrf_token.form_value());
let ctx = UpstreamRegister::new(&link).with_csrf(csrf_token.form_value());
templates.render_upstream_oauth2_do_register(&ctx).await?
}