diff --git a/app/models/remote_storage_authorization.rb b/app/models/remote_storage_authorization.rb index be43a1e..15f677e 100644 --- a/app/models/remote_storage_authorization.rb +++ b/app/models/remote_storage_authorization.rb @@ -35,17 +35,17 @@ class RemoteStorageAuthorization < ApplicationRecord private - def redis - @redis ||= Redis.new(url: Setting.redis_url) - end + def redis + @redis ||= Redis.new(url: Setting.rs_redis_url) + end - def generate_token(length=16) - self.token = SecureRandom.hex(length) if self.token.blank? - end + def generate_token(length=16) + self.token = SecureRandom.hex(length) if self.token.blank? + end - def store_token_in_redis - redis.sadd "rs:authorizations:#{user.address}:#{token}", permissions - end + def store_token_in_redis + redis.sadd "rs:authorizations:#{user.address}:#{token}", permissions + end def schedule_token_expiry return unless expire_at.present?