Reordered state extractors.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user