about summary refs log tree commit diff
path: root/app/presenters/webhooks/event_presenter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/presenters/webhooks/event_presenter.rb')
-rw-r--r--app/presenters/webhooks/event_presenter.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/presenters/webhooks/event_presenter.rb b/app/presenters/webhooks/event_presenter.rb
new file mode 100644
index 000000000..dac14a3f0
--- /dev/null
+++ b/app/presenters/webhooks/event_presenter.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class Webhooks::EventPresenter < ActiveModelSerializers::Model
+  attributes :type, :created_at, :object
+
+  def initialize(type, object)
+    super()
+
+    @type       = type
+    @created_at = Time.now.utc
+    @object     = object
+  end
+end