diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/api/v1/accounts_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index 9b02c9981..9573326ef 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -92,7 +92,8 @@ class Api::V1::AccountsController < ApiController end def search - @accounts = SearchService.new.call(params[:q], params[:resolve] == 'true') + limit = params[:limit] ? [DEFAULT_ACCOUNTS_LIMIT, params[:limit].to_i].min : DEFAULT_ACCOUNTS_LIMIT + @accounts = SearchService.new.call(params[:q], limit, params[:resolve] == 'true') render action: :index end |