deckhearth/pages/api/cards
Randall Stillwell f36fea8e58 🔐 Fix Card Detail Page Authentication Issues
 Authentication Headers Added:
- Added JWT tokens to all API calls in card detail page
- Fixed collections, decks, ownership, and favorites API calls
- Added proper error handling for authentication failures

🔧 Enhanced Ownership API:
- Added GET method to fetch user's card ownership
- Maintains existing POST method for updating ownership
- Returns user-specific quantity data

🎯 User Data Integration:
- Fetches user's owned quantity on page load
- Checks favorite status from user_favorites table
- Refreshes data after collection/deck additions
- All data now properly scoped to authenticated user

🛡️ Security Improvements:
- All API calls now include Authorization headers
- User-specific data fetching implemented
- No more reliance on global card data
- Proper JWT token validation throughout

The card detail page now properly integrates with the secured API endpoints and displays user-specific data correctly! 🃏🔒
2025-07-26 00:32:58 -05:00
..
[id] 🔐 Fix Card Detail Page Authentication Issues 2025-07-26 00:32:58 -05:00
[id].js Created comprehensive admin card editor 2025-07-24 15:16:57 -05:00
import-lorcana.js Add real Lorcana import using Lorcast API 2025-07-24 12:27:10 -05:00
import-mtg.js Major redesign: Enhanced card display with particle effects, improved filters, and search functionality 2025-07-23 21:26:54 -05:00
import-pokemon.js Fix import issues: Add retry logic and better error handling 2025-07-24 10:30:21 -05:00
search.js 🔧 Fixed Cards Page API Response Format 2025-07-25 23:16:35 -05:00