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:
Vishnu Narayanan
2021-11-25 00:55:26 +05:30
committed by GitHub
parent c23e2c23d4
commit 3a48e08fe0
8 changed files with 26 additions and 12 deletions

View File

@@ -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