mirror of
https://github.com/discourse/discourse.git
synced 2024-12-11 16:13:44 +08:00
15 lines
389 B
Ruby
15 lines
389 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class AdminChatIndexSerializer < ApplicationSerializer
|
||
|
has_many :chat_channels, serializer: ChatChannelSerializer, embed: :objects
|
||
|
has_many :incoming_chat_webhooks, serializer: IncomingChatWebhookSerializer, embed: :objects
|
||
|
|
||
|
def chat_channels
|
||
|
object[:chat_channels]
|
||
|
end
|
||
|
|
||
|
def incoming_chat_webhooks
|
||
|
object[:incoming_chat_webhooks]
|
||
|
end
|
||
|
end
|