uncomment action controller
This commit is contained in:
@@ -8,6 +8,7 @@ class Api::ShopsController < Api::ApiController
|
|||||||
def show
|
def show
|
||||||
@shop = Shop.find_by_shop_code(params[:id])
|
@shop = Shop.find_by_shop_code(params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_tax_profiles
|
def get_tax_profiles
|
||||||
@inclusive_tax,@exclusive_tax = TaxProfile.calculate_tax("online_order")
|
@inclusive_tax,@exclusive_tax = TaxProfile.calculate_tax("online_order")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,29 +4,29 @@ class ActionController::Base
|
|||||||
private
|
private
|
||||||
|
|
||||||
def lookup_domain
|
def lookup_domain
|
||||||
# if request.subdomains.last && request.subdomains.last != "www" && ENV["SERVER_MODE"] == "cloud"
|
if request.subdomains.last && request.subdomains.last != "www" && ENV["SERVER_MODE"] == "cloud"
|
||||||
# @license = cache_license(ENV["SX_PROVISION_URL"], request.host) # request.subdomain.downcase
|
@license = cache_license(ENV["SX_PROVISION_URL"], request.host) # request.subdomain.downcase
|
||||||
# if (!@license.nil?)
|
if (!@license.nil?)
|
||||||
# logger.info "Location - " + @license.dbschema
|
logger.info "Location - " + @license.dbschema
|
||||||
# ActiveRecord::Base.establish_connection(website_connection(@license))
|
ActiveRecord::Base.establish_connection(website_connection(@license))
|
||||||
# # authenticate_session_token
|
# authenticate_session_token
|
||||||
# # logger.info "Connecting to - " + @license.subdomain + " - "+ @license.dbhost + "@" + @license.dbschema
|
# logger.info "Connecting to - " + @license.subdomain + " - "+ @license.dbhost + "@" + @license.dbschema
|
||||||
# else
|
else
|
||||||
# # reconnect_default_db
|
# reconnect_default_db
|
||||||
# logger.info 'License is nil'
|
logger.info 'License is nil'
|
||||||
# # redirect_to root_url(:host => request.domain) + "store_error"
|
# redirect_to root_url(:host => request.domain) + "store_error"
|
||||||
# render :json => [{ status: false, message: 'Invalid Access!'}]
|
render :json => [{ status: false, message: 'Invalid Access!'}]
|
||||||
# end
|
end
|
||||||
# elsif request.subdomains.last && request.subdomains.last != "www" || ENV["SERVER_MODE"] == "application"
|
elsif request.subdomains.last && request.subdomains.last != "www" || ENV["SERVER_MODE"] == "application"
|
||||||
# # check for license file
|
# check for license file
|
||||||
# if check_license(request.host)
|
if check_license(request.host)
|
||||||
# current_license(ENV["SX_PROVISION_URL"], request.host)
|
current_license(ENV["SX_PROVISION_URL"], request.host)
|
||||||
# else
|
else
|
||||||
# redirect_to activate_path
|
redirect_to activate_path
|
||||||
# end
|
end
|
||||||
# else
|
else
|
||||||
# not_found
|
not_found
|
||||||
# end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def not_found
|
def not_found
|
||||||
|
|||||||
Reference in New Issue
Block a user