mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 12:05:29 +08:00
Merge pull request #1957 from lonehangman/site_endpoint
Added endpoint for the 'site' JSON (In the preload store)
This commit is contained in:
commit
9e9d03d656
10
app/controllers/site_controller.rb
Normal file
10
app/controllers/site_controller.rb
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
require_dependency 'site_serializer'
|
||||||
|
|
||||||
|
class SiteController < ApplicationController
|
||||||
|
|
||||||
|
def index
|
||||||
|
@site = Site.new(guardian)
|
||||||
|
render_serialized(@site, SiteSerializer)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -15,6 +15,8 @@ Discourse::Application.routes.draw do
|
||||||
|
|
||||||
mount Sidekiq::Web => "/sidekiq", constraints: AdminConstraint.new
|
mount Sidekiq::Web => "/sidekiq", constraints: AdminConstraint.new
|
||||||
|
|
||||||
|
get "site" => "site#index"
|
||||||
|
|
||||||
resources :forums
|
resources :forums
|
||||||
get "srv/status" => "forums#status"
|
get "srv/status" => "forums#status"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user