Add administrative webhooks (#18510)
* Add administrative webhooks * Fix error when webhook is deleted before delivery worker runs
This commit is contained in:
parent
17ba5e1e61
commit
a2871cd747
33 changed files with 530 additions and 8 deletions
13
app/presenters/webhooks/event_presenter.rb
Normal file
13
app/presenters/webhooks/event_presenter.rb
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue