fixed 节点库接口
This commit is contained in:
parent
c014857cf5
commit
3c3ff13ab0
|
@ -4,6 +4,10 @@ class Action::NodeTypesController < ApplicationController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@node_types = Action::NodeType.all
|
@node_types = Action::NodeType.all
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
format.json { render_ok(data: @node_types.as_json) }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
@ -20,7 +24,10 @@ class Action::NodeTypesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
format.json { render_ok(data: @node_type.as_json) }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
@ -45,7 +52,10 @@ class Action::NodeTypesController < ApplicationController
|
||||||
else
|
else
|
||||||
flash[:danger] = '删除失败'
|
flash[:danger] = '删除失败'
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -58,7 +58,10 @@ class Action::NodesController < ApplicationController
|
||||||
else
|
else
|
||||||
flash[:danger] = '删除失败'
|
flash[:danger] = '删除失败'
|
||||||
end
|
end
|
||||||
redirect_to action_nodes_path
|
respond_to do |format|
|
||||||
|
format.html { redirect_to action_nodes_path }
|
||||||
|
format.json { render_ok() }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -49,7 +49,10 @@ class Action::TemplatesController < ApplicationController
|
||||||
else
|
else
|
||||||
flash[:danger] = '删除失败'
|
flash[:danger] = '删除失败'
|
||||||
end
|
end
|
||||||
redirect_to action_templates_path
|
respond_to do |format|
|
||||||
|
format.html { redirect_to action_templates_path }
|
||||||
|
format.json { render_ok }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in New Issue