refactor: Remove API response wrapper pattern.

Replace wrapped responses {success, data, message} with direct data returns
following REST best practices. Simplifies 41 endpoints across 7 route files
and updates all 109 tests. Also fixes test config setup to not require
user home directory config file.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Elisiário Couto
2025-12-07 00:54:51 +00:00
parent a75365d805
commit fabea404ef
17 changed files with 1171 additions and 835 deletions

View File

@@ -66,8 +66,7 @@ class TestAnalyticsFix:
)
# Verify that the response contains stats for all 600 transactions
assert data["success"] is True
stats = data["data"]
stats = data
assert stats["total_transactions"] == 600, (
"Should process all 600 transactions, not just 100"
)
@@ -132,8 +131,7 @@ class TestAnalyticsFix:
)
# Verify that all 600 transactions are returned
assert data["success"] is True
transactions_data = data["data"]
transactions_data = data
assert len(transactions_data) == 600, (
"Analytics endpoint should return all 600 transactions"
)