major claude changes
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import logging
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app import crud, database
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Create a router for auto-specific transaction endpoints
|
||||
auto_router = APIRouter(
|
||||
prefix="/auto/transaction",
|
||||
@@ -16,7 +19,7 @@ def get_auto_delivery_transaction(auto_id: int, db: Session = Depends(database.g
|
||||
Get the pre-authorization transaction for an auto ticket delivery.
|
||||
Used by the capture page for auto deliveries.
|
||||
"""
|
||||
|
||||
logger.info(f"GET /auto/transaction/delivery/{auto_id} - Fetching auto delivery transaction")
|
||||
|
||||
transaction = crud.get_transaction_by_auto_id(db, auto_id=auto_id)
|
||||
if not transaction:
|
||||
@@ -37,6 +40,7 @@ def update_transaction_auto_id(current_auto_id: int, new_auto_id: int, db: Sessi
|
||||
Update the auto_id of a transaction based on the current auto_id.
|
||||
Used to change transaction from auto_delivery.id to auto_ticket.id
|
||||
"""
|
||||
logger.info(f"PUT /auto/transaction/delivery/{current_auto_id}/update/{new_auto_id} - Updating transaction auto ID")
|
||||
transaction = crud.get_transaction_by_auto_id(db, auto_id=current_auto_id)
|
||||
if not transaction:
|
||||
raise HTTPException(status_code=404, detail="No transaction found for this auto delivery")
|
||||
|
||||
Reference in New Issue
Block a user