discourse/app/serializers/admin_web_hook_event_serializer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
501 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2016-06-16 01:49:57 +08:00
class AdminWebHookEventSerializer < ApplicationSerializer
attributes :id,
:web_hook_id,
:request_url,
:headers,
:payload,
:status,
:response_headers,
:response_body,
:duration,
:created_at,
:redelivering
2016-06-16 01:49:57 +08:00
def request_url
object.web_hook.payload_url
end
def redelivering
object.redelivering_webhook_event.present?
end
2016-06-16 01:49:57 +08:00
end