class AdminController < ApplicationController
  before_action :authenticate_user!
  before_action :admin_only

  # def status
  # end

  # def screenshots
  # end

  # def integration
  # end

  # def moderate_list
  # end

  # def logs
  #   logs = Log

  #   if params[:search].present?
  #     logger.debug "Searching for #{params[:search]}"
  #     logs = logs.where("message ilike ?", "%#{params[:search]}%")
  #   end

  #   @logs = logs.paginate(page: params[:page], per_page: 20)
  # end


  # private

  def admin_only
    unless current_user.admin_role?
      head :forbidden
      # redirect_to :back, :alert => "Access denied."
    end
  end

end
