title fixed
This commit is contained in:
parent
40e007de85
commit
2967ee8c9f
|
@ -6,11 +6,13 @@ class Admin::RegisterApiController < ApplicationController
|
||||||
response["success"] = false
|
response["success"] = false
|
||||||
domain = params[:site_domain]
|
domain = params[:site_domain]
|
||||||
email = params[:admin_email]
|
email = params[:admin_email]
|
||||||
|
title = params[:site_title]
|
||||||
site = RegisteredSite.where(:site_domain => domain).first rescue nil
|
site = RegisteredSite.where(:site_domain => domain).first rescue nil
|
||||||
if site.nil?
|
if site.nil?
|
||||||
site = RegisteredSite.new
|
site = RegisteredSite.new
|
||||||
site.site_domain = domain
|
site.site_domain = domain
|
||||||
site.admin_email = email
|
site.admin_email = email
|
||||||
|
site.title_translations = title
|
||||||
site.generate_confirmation_token
|
site.generate_confirmation_token
|
||||||
site.save
|
site.save
|
||||||
response["success"] = true
|
response["success"] = true
|
||||||
|
@ -70,12 +72,6 @@ class Admin::RegisterApiController < ApplicationController
|
||||||
request = Net::HTTP::Post.new("/store/confirmation")
|
request = Net::HTTP::Post.new("/store/confirmation")
|
||||||
request.body = params_to_send.to_query
|
request.body = params_to_send.to_query
|
||||||
response = http.request(request)
|
response = http.request(request)
|
||||||
# data = JSON.parse(response.body)
|
|
||||||
# if data["success"] == true
|
|
||||||
# return true
|
|
||||||
# else
|
|
||||||
# return false
|
|
||||||
# end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def confirm_email
|
def confirm_email
|
||||||
|
@ -93,12 +89,3 @@ class Admin::RegisterApiController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# if
|
|
||||||
# response["success"] = true
|
|
||||||
# # send_confirmation_email(site.admin_email, site.confirmation_token, site.site_token)
|
|
||||||
# else
|
|
||||||
# response["message"] = "Invalid site token."
|
|
||||||
# response["error"] = "INVALID_SITE_TOKEN"
|
|
||||||
# end
|
|
|
@ -32,7 +32,7 @@
|
||||||
<span class="badge badge-success"><%= t("registered_sites.site_active") %></span><br />
|
<span class="badge badge-success"><%= t("registered_sites.site_active") %></span><br />
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td><%= site.category.nil? ? "Category not assigned" : "<span class='label label-info'>#{site.category.title}</span>".html_safe %></td>
|
<td><%= site.category.nil? ? "Category not assigned." : "<span class='label label-info'>#{site.category.title}</span>".html_safe %></td>
|
||||||
<td>
|
<td>
|
||||||
<% site.tags.each do |tag| %>
|
<% site.tags.each do |tag| %>
|
||||||
<span class="label">
|
<span class="label">
|
||||||
|
|
Loading…
Reference in New Issue