discourse/plugins/automation/app/serializers/discourse_automation/trigger_serializer.rb
Osama Sayegh 3d4faf3272
FEATURE: Merge discourse-automation (#26432)
Automation (previously known as discourse-automation) is now a core plugin.
2024-04-03 18:20:43 +03:00

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