0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Read billing url from config and add to API

no issue
This commit is contained in:
Rish 2020-02-26 15:52:55 +05:30 committed by Fabien O'Carroll
parent ccd586ea6e
commit 318484d737

View file

@ -9,7 +9,8 @@ module.exports = {
read: { read: {
permissions: false, permissions: false,
query() { query() {
return { const billingUrl = config.get('host_settings:billing:enabled') ? config.get('host_settings:billing:url') : '';
const response = {
version: ghostVersion.full, version: ghostVersion.full,
environment: config.get('env'), environment: config.get('env'),
database: config.get('database').client, database: config.get('database').client,
@ -19,6 +20,10 @@ module.exports = {
clientExtensions: config.get('clientExtensions') || {}, clientExtensions: config.get('clientExtensions') || {},
enableDeveloperExperiments: config.get('enableDeveloperExperiments') || false enableDeveloperExperiments: config.get('enableDeveloperExperiments') || false
}; };
if (billingUrl) {
response.billingUrl = billingUrl;
}
return response;
} }
} }
}; };