diff --git a/app/controllers/api_wrapper_controller.rb b/app/controllers/api_wrapper_controller.rb index cccf12a..aaa745a 100644 --- a/app/controllers/api_wrapper_controller.rb +++ b/app/controllers/api_wrapper_controller.rb @@ -2,6 +2,8 @@ class ApiWrapperController < ApplicationController def index + return unless parameters_set? + result = ApiWrapper::Index::Organizer.call(params_to_validate: index_params) if result.success? @activity = result.activity @@ -32,4 +34,8 @@ def index_params def latest_activities_params params.permit(:order, :sort) end + + def parameters_set? + index_params.values.any?(&:present?) + end end