feat: make database access more uniform and stop locking as many pool connections
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
This commit is contained in:
parent
f5d4211fad
commit
fa52412b43
30 changed files with 516 additions and 373 deletions
|
@ -58,10 +58,10 @@ pub async fn get(
|
|||
State(app_state): State<Arc<AppState>>,
|
||||
Extension(CurrentUser(uuid)): Extension<CurrentUser<Uuid>>,
|
||||
) -> Result<impl IntoResponse, Error> {
|
||||
global_checks(&app_state, uuid).await?;
|
||||
|
||||
let mut conn = app_state.pool.get().await?;
|
||||
|
||||
global_checks(&mut conn, &app_state.config, uuid).await?;
|
||||
|
||||
let me = Me::get(&mut conn, uuid).await?;
|
||||
|
||||
let memberships = me.fetch_memberships(&mut conn).await?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue