You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-21 23:00:50 +03:00
handlers: remove most usage of anyhow
This commit is contained in:
@@ -41,7 +41,7 @@ pub(crate) async fn get(
|
||||
Query(query): Query<OptionalPostAuthAction>,
|
||||
cookie_jar: PrivateCookieJar<Encrypter>,
|
||||
) -> Result<Response, FancyError> {
|
||||
let (clock, mut rng) = crate::rng_and_clock()?;
|
||||
let (clock, mut rng) = crate::clock_and_rng();
|
||||
let mut conn = pool.acquire().await?;
|
||||
|
||||
let (csrf_token, cookie_jar) = cookie_jar.csrf_token(clock.now(), &mut rng);
|
||||
@@ -81,7 +81,7 @@ pub(crate) async fn post(
|
||||
cookie_jar: PrivateCookieJar<Encrypter>,
|
||||
Form(form): Form<ProtectedForm<ReauthForm>>,
|
||||
) -> Result<Response, FancyError> {
|
||||
let (clock, mut rng) = crate::rng_and_clock()?;
|
||||
let (clock, mut rng) = crate::clock_and_rng();
|
||||
let mut txn = pool.begin().await?;
|
||||
|
||||
let form = cookie_jar.verify_form(clock.now(), form)?;
|
||||
|
||||
Reference in New Issue
Block a user