Class: Vindi::DashboardController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Vindi::DashboardController
- Defined in:
- app/controllers/vindi/dashboard_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/vindi/dashboard_controller.rb', line 7 def index @api_key = Vindi.configuration.api_key @api_url = Vindi.configuration.api_url @cache_enabled = !Vindi.configuration.cache_store.nil? @cache_ttl = Vindi.configuration.cache_ttl @cached_resources = Vindi.configuration.cached_resources fetch_plans_for_dashboard end |
#test_connection ⇒ Object
17 18 19 20 21 22 |
# File 'app/controllers/vindi/dashboard_controller.rb', line 17 def test_connection Vindi::Plan.list(per_page: 1) render json: { status: "success", message: "Successfully connected to Vindi API!" } rescue => e render json: { status: "error", message: e. } end |