Updated config to pull additional host settings

ref e1e5caac3d

- we are working on separating out various host functions into separate applications, all of which Ghost can load if configured
This commit is contained in:
Hannah Wolfe 2021-03-02 12:42:09 +00:00
parent ca619af41a
commit ae3137da40
2 changed files with 18 additions and 0 deletions

View File

@ -10,6 +10,8 @@ module.exports = {
permissions: false,
query() {
const billingUrl = config.get('host_settings:billing:enabled') ? config.get('host_settings:billing:url') : '';
const domainUrl = config.get('host_settings:domain:enabled') ? config.get('host_settings:domain:url') : '';
const updateUrl = config.get('host_settings:update:enabled') ? config.get('host_settings:update:url') : '';
const response = {
version: ghostVersion.full,
environment: config.get('env'),
@ -26,6 +28,13 @@ module.exports = {
if (billingUrl) {
response.billingUrl = billingUrl;
}
if (domainUrl) {
response.domainUrl = domainUrl;
}
if (updateUrl) {
response.updateUrl = updateUrl;
}
return response;
}
}

View File

@ -10,6 +10,8 @@ module.exports = {
permissions: false,
query() {
const billingUrl = config.get('host_settings:billing:enabled') ? config.get('host_settings:billing:url') : '';
const domainUrl = config.get('host_settings:domain:enabled') ? config.get('host_settings:domain:url') : '';
const updateUrl = config.get('host_settings:update:enabled') ? config.get('host_settings:update:url') : '';
const response = {
version: ghostVersion.full,
environment: config.get('env'),
@ -26,6 +28,13 @@ module.exports = {
if (billingUrl) {
response.billingUrl = billingUrl;
}
if (domainUrl) {
response.domainUrl = domainUrl;
}
if (updateUrl) {
response.updateUrl = updateUrl;
}
return response;
}
}