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.

17 lines
345 B

  1. # frozen_string_literal: true
  2. class Api::V1::Instances::RulesController < Api::BaseController
  3. skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
  4. before_action :set_rules
  5. def index
  6. render json: @rules, each_serializer: REST::RuleSerializer
  7. end
  8. private
  9. def set_rules
  10. @rules = Rule.ordered
  11. end
  12. end