mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
21 lines
534 B
Ruby
21 lines
534 B
Ruby
class Admin::EmbeddingController < Admin::AdminController
|
|
|
|
before_filter :ensure_logged_in, :ensure_staff, :fetch_embedding
|
|
|
|
def show
|
|
render_serialized(@embedding, EmbeddingSerializer, root: 'embedding', rest_serializer: true)
|
|
end
|
|
|
|
def update
|
|
render_serialized(@embedding, EmbeddingSerializer, root: 'embedding', rest_serializer: true)
|
|
end
|
|
|
|
protected
|
|
|
|
def fetch_embedding
|
|
@embedding = OpenStruct.new({
|
|
id: 'default',
|
|
embeddable_hosts: EmbeddableHost.all.order(:host)
|
|
})
|
|
end
|
|
end
|