class Api::DisplayImagesController < Api::ApiController
	skip_before_action :authenticate
	skip_before_action :set_current_tenant_by_subdomain_or_name, only: [:display_image]

	def display_image
		display_image = DisplayImage.where("shop_code=?",params[:shop_code]).last
		unless display_image.nil?
			image = Base64.decode64(display_image.image.gsub(/\Adata:image\/jpeg;base64\,/, ''))
			send_data image,:filename=>"shop.jpeg",:type=> "image/jpeg", :disposition => 'inline'
		end
	end
end
