# frozen_string_literal: true require 'booru/config' class StatsController < ApplicationController skip_authorization_check content_security_policy do |policy| policy.frame_src :self end def show @title = 'Site Statistics' @images_aggregation = Post.search(Booru::CONFIG.aggregation[:images]) if show_comments? @comments_aggregation = Comment.search(Booru::CONFIG.aggregation[:comments]) end end end