module Public
  class SitemapController < ActionController::Base
    def show
      base = MatchLiveTv.app_public_url.chomp("/")
      @entries = [
        { loc: "#{base}/", changefreq: "weekly", priority: "1.0" },
        { loc: "#{base}/funzionalita", changefreq: "monthly", priority: "0.9" },
        { loc: "#{base}/prezzi", changefreq: "monthly", priority: "0.9" },
        { loc: "#{base}/pallavolo-giovanile", changefreq: "monthly", priority: "0.85" },
        { loc: "#{base}/faq", changefreq: "monthly", priority: "0.8" },
        { loc: "#{base}/live", changefreq: "hourly", priority: "0.85" },
        { loc: "#{base}/privacy", changefreq: "yearly", priority: "0.3" },
        { loc: "#{base}/termini", changefreq: "yearly", priority: "0.3" }
      ]

      respond_to do |format|
        format.xml { render layout: false }
      end
    end
  end
end
