discourse/app/assets/javascripts/admin/addon/routes/admin-config-about.js
Martin Brennan 2d5f323ca3
DEV: Move config area site setting fetch into new controller (#28136)
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.
2024-07-30 15:41:28 +10:00

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",
],
},
});
}
}