feat: Allow SaaS users to manage subscription within the dashboard (#5059)
This commit is contained in:
@@ -68,3 +68,7 @@
|
||||
- name: CSML_BOT_API_KEY
|
||||
value:
|
||||
locked: false
|
||||
- name: CHATWOOT_CLOUD_PLANS
|
||||
value:
|
||||
- name: DEPLOYMENT_ENV
|
||||
value: self-hosted
|
||||
|
||||
@@ -224,6 +224,23 @@ Rails.application.routes.draw do
|
||||
end
|
||||
end
|
||||
|
||||
if ChatwootApp.enterprise?
|
||||
namespace :enterprise, defaults: { format: 'json' } do
|
||||
namespace :api do
|
||||
namespace :v1 do
|
||||
resources :accounts do
|
||||
member do
|
||||
post :checkout
|
||||
post :subscription
|
||||
end
|
||||
end
|
||||
|
||||
post 'webhooks/stripe', to: 'webhooks/stripe#process_payload'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Routes for platform APIs
|
||||
namespace :platform, defaults: { format: 'json' } do
|
||||
|
||||
Reference in New Issue
Block a user