Add server rules (#15769)
This commit is contained in:
parent
dcc7c686f3
commit
8331fdf7e0
21 changed files with 258 additions and 2 deletions
17
app/controllers/api/v1/instances/rules_controller.rb
Normal file
17
app/controllers/api/v1/instances/rules_controller.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Api::V1::Instances::RulesController < Api::BaseController
|
||||
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
|
||||
|
||||
before_action :set_rules
|
||||
|
||||
def index
|
||||
render json: @rules, each_serializer: REST::RuleSerializer
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_rules
|
||||
@rules = Rule.ordered
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue