mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 14:42:33 -05:00
add webhook event preferences
This commit is contained in:
1 parent
0c690b3033
commit
6788071eec
12 files changed
+130
-12
No files matched your search
+12
-2
@@ -67,14 +67,24 @@ module Accounts
|
||||
new_template
|
||||
end
|
||||
|
||||
def load_webhook_configs(account)
|
||||
def load_webhook_url(account)
|
||||
configs = account.encrypted_configs.find_by(key: EncryptedConfig::WEBHOOK_URL_KEY)
|
||||
|
||||
unless Docuseal.multitenant?
|
||||
configs ||= Account.order(:id).first.encrypted_configs.find_by(key: EncryptedConfig::WEBHOOK_URL_KEY)
|
||||
end
|
||||
|
||||
configs
|
||||
configs&.value.presence
|
||||
end
|
||||
|
||||
def load_webhook_preferences(account)
|
||||
configs = account.account_configs.find_by(key: AccountConfig::WEBHOOK_PREFERENCES_KEY)
|
||||
|
||||
unless Docuseal.multitenant?
|
||||
configs ||= Account.order(:id).first.account_configs.find_by(key: AccountConfig::WEBHOOK_PREFERENCES_KEY)
|
||||
end
|
||||
|
||||
configs&.value.presence || {}
|
||||
end
|
||||
|
||||
def load_signing_pkcs(account)
|
||||
|
||||
Reference in new issue
Block a user