You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
handlers: extract the PgRepository from the request
Also fix a bunch of clippy errors & doctests
This commit is contained in:
@@ -39,7 +39,6 @@ use oauth2_types::{
|
||||
};
|
||||
use rand::{distributions::Alphanumeric, Rng};
|
||||
use serde::Deserialize;
|
||||
use sqlx::PgPool;
|
||||
use thiserror::Error;
|
||||
|
||||
use self::{callback::CallbackDestination, complete::GrantCompletionError};
|
||||
@@ -136,12 +135,10 @@ pub(crate) async fn get(
|
||||
clock: BoxClock,
|
||||
State(policy_factory): State<Arc<PolicyFactory>>,
|
||||
State(templates): State<Templates>,
|
||||
State(pool): State<PgPool>,
|
||||
mut repo: PgRepository,
|
||||
cookie_jar: PrivateCookieJar<Encrypter>,
|
||||
Form(params): Form<Params>,
|
||||
) -> Result<Response, RouteError> {
|
||||
let mut repo = PgRepository::from_pool(&pool).await?;
|
||||
|
||||
// First, figure out what client it is
|
||||
let client = repo
|
||||
.oauth2_client()
|
||||
|
||||
Reference in New Issue
Block a user