Commit Graph

5 Commits

Author SHA1 Message Date
javayhu
23cd59bbac refactor: biome lint part 1 2025-04-18 21:47:14 +08:00
javayhu
49a9de1a05 refactor: standardize session handling and clean up payment-related code
- Replaced instances of `authSession` with `session` for consistency across actions.
- Removed unused `getCustomer` function and related types from payment module to streamline codebase.
- Enhanced `createOrGetCustomer` method to simplify customer creation logic.
- Updated metadata handling in checkout session creation for improved clarity and maintainability.
2025-04-08 00:15:08 +08:00
javayhu
ab8d85be00 feat: add subscription and membership fields to user schema and update related actions
- Introduced new columns `subscription_id` and `lifetime_member` to the user table for enhanced subscription management.
- Updated the user schema in the database to reflect these changes.
- Refactored actions to utilize the new user fields for better subscription handling.
- Enhanced error handling and logging in relevant actions for improved user feedback.
- Updated translations to include new messages related to subscription status and lifetime access.
2025-04-04 10:07:39 +08:00
javayhu
ef740e23db feat: add authentication checks to checkout and customer portal actions
- Integrated authentication session validation in createCheckoutAction and createPortalAction to ensure only authorized users can create sessions.
- Enhanced unsubscribeNewsletterAction with similar authentication checks for improved security and user feedback.
2025-03-24 23:54:59 +08:00
javayhu
ff06d4dfec feat: implement newsletter and payment actions with improved error handling
- Added actions for checking newsletter subscription status, subscribing, and unsubscribing.
- Introduced actions for creating checkout and customer portal sessions with validation.
- Replaced deprecated newsletter actions in components with new implementations.
- Enhanced error handling and logging for all new actions to improve user feedback.
2025-03-23 17:06:51 +08:00