fix error
This commit is contained in:
parent
dcbe1f2f2f
commit
bfa657775f
|
@ -64,6 +64,7 @@ class Admin::RegisterApiController < ApplicationController
|
||||||
if site.nil? && site_token.blank?
|
if site.nil? && site_token.blank?
|
||||||
send_token = true
|
send_token = true
|
||||||
site = RegisteredSite.find_by(:site_domain => params[:site_domain]) rescue nil
|
site = RegisteredSite.find_by(:site_domain => params[:site_domain]) rescue nil
|
||||||
|
site_token = site.uid
|
||||||
end
|
end
|
||||||
if !site.nil?
|
if !site.nil?
|
||||||
site.site_domain = params[:site_domain]
|
site.site_domain = params[:site_domain]
|
||||||
|
@ -84,6 +85,7 @@ class Admin::RegisterApiController < ApplicationController
|
||||||
end
|
end
|
||||||
if send_token
|
if send_token
|
||||||
render :json => {"success" => true, 'site_anncs'=>site_anncs, 'store_token' => site_token}.to_json
|
render :json => {"success" => true, 'site_anncs'=>site_anncs, 'store_token' => site_token}.to_json
|
||||||
|
puts ['send_token', site_token]
|
||||||
else
|
else
|
||||||
render :json => {"success" => true, 'site_anncs'=>site_anncs}.to_json
|
render :json => {"success" => true, 'site_anncs'=>site_anncs}.to_json
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue