DEV: Allow new_features URL to be configurable (#24306)

This is so the new features plugin can be tested
easier locally.
This commit is contained in:
Martin Brennan
2023-11-09 13:50:21 +10:00
committed by GitHub
parent e5e7dd78c2
commit e772bb9fce
2 changed files with 8 additions and 7 deletions

View File

@ -218,6 +218,11 @@ module DiscourseUpdates
)
end
def new_features_endpoint
return "https://meta.discourse.org/new-features.json" if Rails.env.production?
ENV["DISCOURSE_NEW_FEATURES_ENDPOINT"] || "http://localhost:4200/new-features.json"
end
private
def last_installed_version_key
@ -248,10 +253,6 @@ module DiscourseUpdates
"missing_version"
end
def new_features_endpoint
"https://meta.discourse.org/new-features.json"
end
def new_features_key
"new_features"
end