fixed 节点库接口

This commit is contained in:
xxq250 2024-12-30 16:04:20 +08:00
parent c014857cf5
commit 3c3ff13ab0
3 changed files with 20 additions and 4 deletions

View File

@ -4,6 +4,10 @@ class Action::NodeTypesController < ApplicationController
def index
@node_types = Action::NodeType.all
respond_to do |format|
format.html
format.json { render_ok(data: @node_types.as_json) }
end
end
def create
@ -20,7 +24,10 @@ class Action::NodeTypesController < ApplicationController
end
def show
respond_to do |format|
format.html
format.json { render_ok(data: @node_type.as_json) }
end
end
def new
@ -45,7 +52,10 @@ class Action::NodeTypesController < ApplicationController
else
flash[:danger] = '删除失败'
end
redirect_to action_node_types_path
respond_to do |format|
format.html { redirect_to action_node_types_path }
format.json { render_ok }
end
end
private

View File

@ -58,7 +58,10 @@ class Action::NodesController < ApplicationController
else
flash[:danger] = '删除失败'
end
redirect_to action_nodes_path
respond_to do |format|
format.html { redirect_to action_nodes_path }
format.json { render_ok() }
end
end
private

View File

@ -49,7 +49,10 @@ class Action::TemplatesController < ApplicationController
else
flash[:danger] = '删除失败'
end
redirect_to action_templates_path
respond_to do |format|
format.html { redirect_to action_templates_path }
format.json { render_ok }
end
end
private