about summary refs log tree commit diff
path: root/app/serializers/rest/encrypted_message_serializer.rb
blob: 80c26d060ea32f0ba6db0251b2b7af979b9e496e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

class REST::EncryptedMessageSerializer < ActiveModel::Serializer
  attributes :id, :account_id, :device_id,
             :type, :body, :digest, :message_franking,
             :created_at

  def id
    object.id.to_s
  end

  def account_id
    object.from_account_id.to_s
  end

  def device_id
    object.from_device_id
  end
end