diff --git a/app/controllers/action/node_inputs_controller.rb b/app/controllers/action/node_inputs_controller.rb index 5e1a319c4..6e62c6ef8 100644 --- a/app/controllers/action/node_inputs_controller.rb +++ b/app/controllers/action/node_inputs_controller.rb @@ -1,5 +1,5 @@ class Action::NodeInputsController < ApplicationController - before_action :require_admin, except: [:index] + # before_action :require_admin, except: [:index] before_action :find_action_node def index @@ -50,7 +50,10 @@ class Action::NodeInputsController < ApplicationController else flash[:danger] = '删除失败' end - redirect_to "api/actions/nodes" + respond_to do |format| + format.html { redirect_to action_nodes_path } + format.json { render_ok() } + end end private diff --git a/app/controllers/action/node_selects_controller.rb b/app/controllers/action/node_selects_controller.rb index 9acd6fc5f..865162be7 100644 --- a/app/controllers/action/node_selects_controller.rb +++ b/app/controllers/action/node_selects_controller.rb @@ -1,6 +1,6 @@ class Action::NodeSelectsController < ApplicationController - before_action :require_admin, except: [:index] + # before_action :require_admin, except: [:index] before_action :find_action_node def index @@ -51,7 +51,10 @@ class Action::NodeSelectsController < ApplicationController else flash[:danger] = '删除失败' end - redirect_to "api/actions/nodes" + respond_to do |format| + format.html { redirect_to action_nodes_path } + format.json { render_ok() } + end end private diff --git a/app/controllers/action/node_types_controller.rb b/app/controllers/action/node_types_controller.rb index e90bb665c..14f4c4594 100644 --- a/app/controllers/action/node_types_controller.rb +++ b/app/controllers/action/node_types_controller.rb @@ -1,5 +1,5 @@ class Action::NodeTypesController < ApplicationController - before_action :require_admin, except: [:index] + # before_action :require_admin, except: [:index] before_action :find_node_type, except: [:index, :create, :new] def index diff --git a/app/controllers/action/templates_controller.rb b/app/controllers/action/templates_controller.rb index f7f99b7d7..61d1baa09 100644 --- a/app/controllers/action/templates_controller.rb +++ b/app/controllers/action/templates_controller.rb @@ -1,5 +1,5 @@ class Action::TemplatesController < ApplicationController - before_action :require_admin, except: [:index] + # before_action :require_admin, except: [:index] before_action :find_action_template, except: [:index, :create, :new] def index