Fix bug.
This commit is contained in:
parent
172b1332dd
commit
68b7ec7efe
|
@ -1,7 +1,8 @@
|
|||
module RegisteredModuleHelper
|
||||
def install_on_server(site, mod)
|
||||
domain_url = request.protocol + request.host_with_port
|
||||
mod = "feeds" if mod == "feed"
|
||||
params_to_send = {"site_token" => site.site_token, "module_name" => mod.name, "git_path" => mod.git_path, "template" => "http://store.tp.rulingcom.com#{mod.template.url}", "module_key" => mod.module_key,"template_filename" => mod.template.file.filename}
|
||||
params_to_send = {"site_token" => site.site_token, "module_name" => mod.name, "git_path" => mod.git_path, "template" => "#{domain_url}#{mod.template.url}", "module_key" => mod.module_key,"template_filename" => mod.template.file.filename}
|
||||
uri = URI.parse("http://#{site.site_domain}/")
|
||||
http = Net::HTTP.new(uri.host,uri.port)
|
||||
request = Net::HTTP::Post.new("/store/install_module")
|
||||
|
@ -24,7 +25,6 @@ module RegisteredModuleHelper
|
|||
uri = URI.parse("http://#{site.site_domain}/")
|
||||
http = Net::HTTP.new(uri.host,uri.port)
|
||||
request = Net::HTTP::Post.new("/store/restart_server_after_install")
|
||||
request.body = params_to_send.to_query
|
||||
response = http.request(request)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue