# -*- encoding : utf-8 -*-

class Admin::QiStatsController < ApplicationController

	before_action :auth_admin
	
	layout "admin"
	

	def update

	  if params[:enabled]
	  	session[:qi_stats] = true
	  else
	  	session[:qi_stats] = false
      
	  end
    
    if !request.xhr?
	    redirect_back(fallback_location: "/admin")
    else
      puts session[:qi_stats]
    end

	end

  
end
