feat: migrate facebook env vars to globalConfig (#3369)
Migrate facebook env vars to globalConfig and make it editable from the super admin UI.
This commit is contained in:
@@ -23,6 +23,8 @@ class InstallationConfig < ApplicationRecord
|
||||
default_scope { order(created_at: :desc) }
|
||||
scope :editable, -> { where(locked: false) }
|
||||
|
||||
after_commit :clear_cache
|
||||
|
||||
def value
|
||||
serialized_value[:value]
|
||||
end
|
||||
@@ -38,4 +40,8 @@ class InstallationConfig < ApplicationRecord
|
||||
def set_lock
|
||||
self.locked = true if locked.nil?
|
||||
end
|
||||
|
||||
def clear_cache
|
||||
GlobalConfig.clear_cache
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user