|
|
|
@ -57,7 +57,10 @@ module Api
|
|
|
|
SearchEntries.enqueue_reindex(@template)
|
|
|
|
SearchEntries.enqueue_reindex(@template)
|
|
|
|
|
|
|
|
|
|
|
|
WebhookUrls.enqueue_events(@template, 'template.updated')
|
|
|
|
WebhookUrls.enqueue_events(@template, 'template.updated')
|
|
|
|
WebhookUrls.enqueue_events(@template, 'template.archived') if @template.saved_change_to_archived_at? && @template.archived_at?
|
|
|
|
|
|
|
|
|
|
|
|
if @template.saved_change_to_archived_at? && @template.archived_at?
|
|
|
|
|
|
|
|
WebhookUrls.enqueue_events(@template, 'template.archived')
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
render json: @template.as_json(only: %i[id updated_at])
|
|
|
|
render json: @template.as_json(only: %i[id updated_at])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|