discourse/plugins/automation/app/serializers/discourse_automation/trigger_serializer.rb

12 lines
268 B
Ruby

# frozen_string_literal: true
module DiscourseAutomation
class TriggerSerializer < ApplicationSerializer
attributes :id, :name, :metadata
def metadata
((options[:trigger_metadata] || {}).stringify_keys).merge(object.metadata || {})
end
end
end