Merge pull request #1957 from lonehangman/site_endpoint

Added endpoint for the 'site' JSON (In the preload store)
This commit is contained in:
Régis Hanol 2014-02-17 09:49:01 +01:00
commit 9e9d03d656
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,10 @@
require_dependency 'site_serializer'
class SiteController < ApplicationController
def index
@site = Site.new(guardian)
render_serialized(@site, SiteSerializer)
end
end

View File

@ -14,6 +14,8 @@ Discourse::Application.routes.draw do
match "/404", to: "exceptions#not_found", via: [:get, :post]
mount Sidekiq::Web => "/sidekiq", constraints: AdminConstraint.new
get "site" => "site#index"
resources :forums
get "srv/status" => "forums#status"