summaryrefslogtreecommitdiff
path: root/app/models/hooks/service_hook.rb
blob: 4caa45a13d4fea562a0fe1b977b97519753ea338 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

class ServiceHook < WebHook
  include Presentable

  belongs_to :service
  validates :service, presence: true

  # rubocop: disable CodeReuse/ServiceClass
  def execute(data, hook_name = 'service_hook')
    WebHookService.new(self, data, hook_name).execute
  end
  # rubocop: enable CodeReuse/ServiceClass
end