about summary refs log tree commit diff
path: root/app/serializers/rest/scheduled_status_serializer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/rest/scheduled_status_serializer.rb')
-rw-r--r--app/serializers/rest/scheduled_status_serializer.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/serializers/rest/scheduled_status_serializer.rb b/app/serializers/rest/scheduled_status_serializer.rb
new file mode 100644
index 000000000..5d6311b87
--- /dev/null
+++ b/app/serializers/rest/scheduled_status_serializer.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class REST::ScheduledStatusSerializer < ActiveModel::Serializer
+  attributes :id, :scheduled_at, :params
+
+  has_many :media_attachments, serializer: REST::MediaAttachmentSerializer
+
+  def id
+    object.id.to_s
+  end
+
+  def params
+    object.params.without(:application_id)
+  end
+end