#251 - Disable subscription in community edition (#277)

* #251 - Disable subscription in community edition

* Hide billing routes in sidebar for community edition

* Remove subscription serializer if billing disabled
This commit is contained in:
Sojan Jose
2019-11-24 19:09:17 +05:30
committed by Sony Mathew
parent 54556bfd58
commit 78adcf822d
8 changed files with 70 additions and 41 deletions

View File

@@ -44,18 +44,6 @@ Rails.application.routes.draw do
end
end
resources :subscriptions, only: [:index] do
collection do
get :summary
end
end
resources :webhooks, only: [] do
collection do
post :chargebee
end
end
resources :reports, only: [] do
collection do
get :account
@@ -79,6 +67,22 @@ Rails.application.routes.draw do
get :get_messages
end
end
# this block is only required if subscription via chargebee is enabled
if ENV['BILLING_ENABLED']
resources :subscriptions, only: [:index] do
collection do
get :summary
end
end
resources :webhooks, only: [] do
collection do
post :chargebee
end
end
end
end
end