mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-23 07:16:18 +00:00
fix: backward compatibility for legacy purchase subscription system
- Add PurchaseRouter.vue to dynamically render PaymentView or PurchaseSubscriptionView based on payment_enabled vs purchase_subscription_enabled settings - Fix route guard to allow access when either payment system is enabled - Split sidebar menu: /purchase shows for both systems, /orders only for built-in payment - Remove auto-migration that forcibly disabled legacy purchase system on first startup (MigrateLegacyPurchaseURL) - Add payment_enabled to PublicSettings API response so frontend can check both systems from a single endpoint - Restore legacy purchase link config UI controls in admin Payment tab - Split payment settings save to use dedicated PUT /admin/payment/config API instead of mixing into general settings endpoint - Add admin payment config API functions (getConfig/updateConfig)
This commit is contained in:
1 parent
96b1a96cf9
commit
4a703cb084
15 files changed
+258
-27
No files matched your search
@@ -128,6 +128,7 @@ type PublicSettings struct {
|
||||
CustomEndpoints []CustomEndpoint `json:"custom_endpoints"`
|
||||
LinuxDoOAuthEnabled bool `json:"linuxdo_oauth_enabled"`
|
||||
BackendModeEnabled bool `json:"backend_mode_enabled"`
|
||||
PaymentEnabled bool `json:"payment_enabled"`
|
||||
Version string `json:"version"`
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user