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?
|
||||
send_token = true
|
||||
site = RegisteredSite.find_by(:site_domain => params[:site_domain]) rescue nil
|
||||
site_token = site.uid
|
||||
end
|
||||
if !site.nil?
|
||||
site.site_domain = params[:site_domain]
|
||||
|
@ -84,6 +85,7 @@ class Admin::RegisterApiController < ApplicationController
|
|||
end
|
||||
if send_token
|
||||
render :json => {"success" => true, 'site_anncs'=>site_anncs, 'store_token' => site_token}.to_json
|
||||
puts ['send_token', site_token]
|
||||
else
|
||||
render :json => {"success" => true, 'site_anncs'=>site_anncs}.to_json
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue