Use config_for for VAPID key storage (#34845)
				
					
				
			This commit is contained in:
		@@ -18,6 +18,6 @@ class REST::ApplicationSerializer < ActiveModel::Serializer
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def vapid_key
 | 
			
		||||
    Rails.configuration.x.vapid_public_key
 | 
			
		||||
    Rails.configuration.x.vapid.public_key
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
@@ -65,7 +65,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      vapid: {
 | 
			
		||||
        public_key: Rails.configuration.x.vapid_public_key,
 | 
			
		||||
        public_key: Rails.configuration.x.vapid.public_key,
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      accounts: {
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@ class REST::WebPushSubscriptionSerializer < ActiveModel::Serializer
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def server_key
 | 
			
		||||
    Rails.configuration.x.vapid_public_key
 | 
			
		||||
    Rails.configuration.x.vapid.public_key
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def policy
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user