mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 14:42:33 -05:00
use webhook urls instead of encrypted configs
This commit is contained in:
1 parent
f669045362
commit
84edb6dbda
50 files changed
+1350
-269
No files matched your search
@@ -67,3 +67,19 @@ RSpec.configure do |config|
|
||||
Sidekiq::Testing.inline! if example.metadata[:sidekiq] == :inline
|
||||
end
|
||||
end
|
||||
|
||||
def replace_timestamps(data, replace = /.*/)
|
||||
timestamp_fields = %w[created_at updated_at completed_at sent_at opened_at timestamp]
|
||||
|
||||
data.each do |key, value|
|
||||
if timestamp_fields.include?(key) && (value.is_a?(String) || value.is_a?(Time))
|
||||
data[key] = replace
|
||||
elsif value.is_a?(Hash)
|
||||
replace_timestamps(value)
|
||||
elsif value.is_a?(Array)
|
||||
value.each { |item| replace_timestamps(item) if item.is_a?(Hash) }
|
||||
end
|
||||
end
|
||||
|
||||
data
|
||||
end
|
||||
Reference in new issue
Block a user