1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-21 23:00:50 +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

@@ -61,10 +61,7 @@ pub(crate) async fn get(
let ctx = ReauthContext::default();
let next = query.load_context(&mut conn).await?;
let ctx = if let Some(next) = next {
// SAFETY: we should have an action only if we have a "next" context
// TODO: make that cleaner
let action = query.post_auth_action.unwrap();
ctx.with_post_action(next, action)
ctx.with_post_action(next)
} else {
ctx
};