Fixed 405 Method Not Allowed error on subscription pages:
Issue:
- Subscription pages were making GET requests to /api/user/profile
- The API route only had a PUT handler (for profile updates)
- This caused 405 (Method Not Allowed) errors
Solution:
- Added GET handler to /api/user/profile/route.ts
- Handler authenticates user via Bearer token
- Returns complete user data including subscription fields:
* subscriptionTier
* subscriptionStatus
* conversationLimit
* conversationCount
* limitResetDate
* stripeCustomerId
* stripeSubscriptionId
Result:
- Subscription pages can now fetch user data successfully
- Settings page subscription widget displays correctly
- No more 405 errors in console
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>