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
+4 -4
View File
@@ -35,8 +35,8 @@ pub struct QueryParams {
#[tracing::instrument(skip(pool))]
async fn list_scheduled_transactions(
Auth(auth): Auth,
State(pool): State<PgPool>,
Query(query): Query<QueryParams>,
State(pool): State<PgPool>,
) -> Result<Json<Vec<ScheduledTransactionResponse>>, AppError> {
let user_id = auth.user_id();
@@ -60,8 +60,8 @@ async fn list_scheduled_transactions(
#[tracing::instrument(skip(pool))]
async fn get_scheduled_transaction(
Auth(auth): Auth,
State(pool): State<PgPool>,
Path(id): Path<Uuid>,
State(pool): State<PgPool>,
) -> Result<Json<ScheduledTransactionResponse>, AppError> {
let user_id = auth.user_id();
@@ -83,8 +83,8 @@ async fn get_scheduled_transaction(
#[tracing::instrument(skip(pool, transaction))]
async fn upsert_scheduled_transaction(
Auth(auth): Auth,
State(pool): State<PgPool>,
Path(id): Path<Uuid>,
State(pool): State<PgPool>,
Json(transaction): Json<ScheduledTransactionRequest>,
) -> Result<(StatusCode, Json<ScheduledTransactionResponse>), AppError> {
let user_id = auth.user_id();
@@ -117,8 +117,8 @@ async fn upsert_scheduled_transaction(
#[tracing::instrument(skip(pool))]
async fn delete_scheduled_transaction(
Auth(auth): Auth,
State(pool): State<PgPool>,
Path(id): Path<Uuid>,
State(pool): State<PgPool>,
) -> Result<StatusCode, AppError> {
repository::recurring_transactions::delete_by_id(&pool, auth.user_id(), id)
.await?