fedibird-fe/app/serializers/misskey/meta_serializer.rb

23 lines
364 B
Ruby
Raw Normal View History

2023-03-02 16:13:11 +00:00
# frozen_string_literal: true
class Misskey::MetaSerializer < ActiveModel::Serializer
attributes :metaVersion, :host, :exportedAt
has_many :emojis, serializer: Misskey::CustomEmojiSerializer
def metaVersion
2
end
def host
Rails.configuration.x.local_domain
end
def exportedAt
Time.now.iso8601
end
def emojis
object
end
end