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