discourse/plugins/chat/app/serializers/admin_chat_index_serializer.rb
Roman Rizzi 0a5f548635
DEV: Move discourse-chat to the core repo. (#18776)
As part of this move, we are also renaming `discourse-chat` to `chat`.
2022-11-02 10:41:30 -03:00

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