This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/controllers/site_controller.rb
Sam e5888cf090 PERF: avoid preloading json in cases where it is not needed
(uploads / avatars / non GET requests)
2015-05-20 17:12:16 +10:00

28 lines
412 B
Ruby

require_dependency 'site_serializer'
class SiteController < ApplicationController
skip_before_filter :preload_json
def site
render json: Site.json_for(guardian)
end
def settings
render json: SiteSetting.client_settings_json
end
def custom_html
render json: custom_html_json
end
def banner
render json: banner_json
end
def emoji
render json: custom_emoji
end
end