Reordered state extractors.

This commit is contained in:
2026-10-12 18:19:15 +02:00
parent 2b37fd6ebc
commit 51a1b85429
7 changed files with 30 additions and 29 deletions
+3 -3
View File
@@ -32,8 +32,8 @@ pub struct QueryParams {
#[tracing::instrument(skip(pool))]
async fn list_transactions(
Auth(auth): Auth,
State(pool): State<PgPool>,
Query(query): Query<QueryParams>,
State(pool): State<PgPool>,
) -> Result<Json<Vec<TransactionResponse>>, AppError> {
let user_id = auth.user_id();
@@ -57,8 +57,8 @@ async fn list_transactions(
#[tracing::instrument(skip(pool))]
async fn get_transaction(
Auth(auth): Auth,
State(pool): State<PgPool>,
Path(id): Path<Uuid>,
State(pool): State<PgPool>,
) -> Result<Json<TransactionResponse>, AppError> {
let user_id = auth.user_id();
@@ -79,8 +79,8 @@ async fn get_transaction(
#[tracing::instrument(skip(pool, transaction))]
async fn upsert_transaction(
Auth(auth): Auth,
State(pool): State<PgPool>,
Path(id): Path<Uuid>,
State(pool): State<PgPool>,
Json(transaction): Json<TransactionRequest>,
) -> Result<(StatusCode, Json<TransactionResponse>), AppError> {
let user_id = auth.user_id();