0
0
Fork 0

Use mastodon config namespace to load software update default value via config_for (#30534)

This commit is contained in:
Matt Jankowski 2024-11-12 03:28:31 -05:00 committed by GitHub
parent aeae152006
commit c099797700
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 23 additions and 12 deletions

View file

@ -24,7 +24,7 @@ class SoftwareUpdate < ApplicationRecord
class << self
def check_enabled?
ENV['UPDATE_CHECK_URL'] != ''
Rails.configuration.x.mastodon.software_update_url.present?
end
def pending_to_a

View file

@ -27,7 +27,7 @@ class SoftwareUpdateCheckService < BaseService
end
def api_url
ENV.fetch('UPDATE_CHECK_URL', 'https://api.joinmastodon.org/update-check')
Rails.configuration.x.mastodon.software_update_url
end
def version