Commit 030b7723 by John Doe

tweaks for local execution

parent fa392969
...@@ -31,7 +31,7 @@ class InterfacesController < ActionController::Base ...@@ -31,7 +31,7 @@ class InterfacesController < ActionController::Base
#everything else is proxied #everything else is proxied
def get def get
path = request.fullpath.sub("/interfaces/#{@joule_module.id}", "") path = request.fullpath.sub("/api/interfaces/#{@joule_module.id}", "")
proxied_response = @node_adapter.module_interface(@joule_module,path) proxied_response = @node_adapter.module_interface(@joule_module,path)
render plain: proxied_response.body render plain: proxied_response.body
...@@ -44,7 +44,7 @@ class InterfacesController < ActionController::Base ...@@ -44,7 +44,7 @@ class InterfacesController < ActionController::Base
end end
def post def post
path = request.fullpath.sub("/interfaces/#{@joule_module.id}", "") path = request.fullpath.sub("/api/interfaces/#{@joule_module.id}", "")
proxied_response = @node_adapter.module_post_interface(@joule_module,path) proxied_response = @node_adapter.module_post_interface(@joule_module,path)
render plain: proxied_response.body render plain: proxied_response.body
......
...@@ -86,7 +86,8 @@ Rails.application.configure do ...@@ -86,7 +86,8 @@ Rails.application.configure do
config.active_record.dump_schema_after_migration = false config.active_record.dump_schema_after_migration = false
config.interface_url_template = lambda do |id| config.interface_url_template = lambda do |id|
return "http://#{id}.interfaces.wattsworth.local" #return "http://#{id}.interfaces.wattsworth.local"
return "http://wattsworth.local/api/interfaces/#{id}"
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment