🐛 Authentication Issue Resolution: - Removed incorrect Authorization header from collections API call - Modal was using 'auth_token' header when API uses development fallback - Updated to match successful pattern used by collections page 📡 API Call Corrections: - Collections fetch: Removed Authorization header (uses dev fallback) - Add to collection: Removed Authorization header (middleware handles auth) - Fixed response data handling (API returns array directly) - Added better error handling and logging 🔍 Root Cause Analysis: - CollectionSelectionModal used localStorage.getItem('auth_token') - But /api/collections works without auth headers in development - Other successful pages (collections.js, collection/[id].js) don't send auth headers - Development middleware provides fallback admin user automatically ✅ Expected Behavior: - Collections modal should now load user's collections properly - Batch adding cards to collections should work correctly - Consistent with authentication pattern used throughout app - Better error messages for debugging The 'Add to Collections' modal should now properly display collections! 📚✨ |
||
|---|---|---|
| .. | ||
| ActivityLog.js | ||
| AdminProtected.js | ||
| AuthLayout.js | ||
| BulkInviteModal.js | ||
| BulkSelectionToolbar.js | ||
| CardItem.js | ||
| CollaborationManager.js | ||
| CollaboratorFacepile.js | ||
| CollectionSelectionModal.js | ||
| Layout.js | ||
| PermissionIndicator.js | ||
| ShareModal.js | ||
| UploadImageModal.js | ||