some thing idk
This commit is contained in:
@@ -31,7 +31,9 @@ def get_transactions(
|
||||
search_term = f"%{search.strip().lower()}%"
|
||||
query = query.filter(func.lower(Transaction.item).like(search_term))
|
||||
|
||||
transactions = query.order_by(Transaction.created_at.asc()).all()
|
||||
# Get all transactions ordered by user first, then by created_at
|
||||
# This ensures all transactions for the same user are grouped together
|
||||
transactions = query.order_by(Transaction.user.asc(), Transaction.created_at.asc()).all()
|
||||
return transactions
|
||||
|
||||
@router.post("", response_model=List[TransactionSchema])
|
||||
|
||||
Reference in New Issue
Block a user