mirror of
https://github.com/discourse/discourse.git
synced 2024-12-21 10:23:42 +08:00
12 lines
268 B
Ruby
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
|