mirror of
https://github.com/discourse/discourse.git
synced 2024-12-15 09:53:42 +08:00
2d5f323ca3
Followup 4aea12fdcb
In certain config areas (like About) we want to be able
to fetch specific site settings by name. In this case,
sometimes we need to be able to fetch hidden settings,
in cases where a config area is still experimental.
Splitting out a different endpoint for this purpose
allows us to be stricter with what we return for config
areas without affecting the main site settings UI, revealing
hidden settings before they are ready.
26 lines
640 B
JavaScript
26 lines
640 B
JavaScript
import Route from "@ember/routing/route";
|
|
import { ajax } from "discourse/lib/ajax";
|
|
|
|
export default class AdminConfigAboutRoute extends Route {
|
|
model() {
|
|
return ajax("/admin/config/site_settings.json", {
|
|
data: {
|
|
filter_names: [
|
|
"title",
|
|
"site_description",
|
|
"extended_site_description",
|
|
"about_banner_image",
|
|
"community_owner",
|
|
"contact_email",
|
|
"contact_url",
|
|
"site_contact_username",
|
|
"site_contact_group_name",
|
|
"company_name",
|
|
"governing_law",
|
|
"city_for_disputes",
|
|
],
|
|
},
|
|
});
|
|
}
|
|
}
|