2023-09-03 14:05:31 +03:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
|
|
class SmsSettingsController < ApplicationController
|
2023-09-17 00:45:57 +03:00
|
|
|
before_action :load_encrypted_config
|
|
|
|
|
authorize_resource :encrypted_config, only: :index
|
|
|
|
|
authorize_resource :encrypted_config, parent: false, except: :index
|
|
|
|
|
|
2023-09-03 14:05:31 +03:00
|
|
|
def index; end
|
2023-09-17 00:45:57 +03:00
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
def load_encrypted_config
|
|
|
|
|
@encrypted_config =
|
|
|
|
|
EncryptedConfig.find_or_initialize_by(account: current_account, key: 'sms_configs')
|
|
|
|
|
end
|
2023-09-03 14:05:31 +03:00
|
|
|
end
|