Files
dsas-cca-backend-bun/engage-api
JamesFlare1212 5f630f8599 perf(api): optimize cookie validation with fail-fast strategy
Before: Pre-validate cookie before every request (2-4 API calls per activity)
After: Direct request, only validate on 4xx error (1-2 API calls per activity)

Changes:
- Remove pre-validation step in fetchActivityData
- Keep existing 4xx error handling with re-login logic
- Add debug log to track cookie usage

Impact: ~20-30% reduction in API calls for normal scenarios
Benefit: Faster scanning, less load on engage API
2026-04-06 21:37:06 -04:00
..