You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
464 B

  1. # frozen_string_literal: true
  2. class Api::V2::SuggestionsController < Api::BaseController
  3. include Authorization
  4. before_action -> { doorkeeper_authorize! :read }
  5. before_action :require_user!
  6. before_action :set_suggestions
  7. def index
  8. render json: @suggestions, each_serializer: REST::SuggestionSerializer
  9. end
  10. private
  11. def set_suggestions
  12. @suggestions = AccountSuggestions.get(current_account, limit_param(DEFAULT_ACCOUNTS_LIMIT))
  13. end
  14. end