From 318484d7378d9ae4c6eade6933115bb46f21431b Mon Sep 17 00:00:00 2001 From: Rish Date: Wed, 26 Feb 2020 15:52:55 +0530 Subject: [PATCH] Read billing url from config and add to API no issue --- core/server/api/canary/config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/server/api/canary/config.js b/core/server/api/canary/config.js index f0f2011ab7..963a5fee7b 100644 --- a/core/server/api/canary/config.js +++ b/core/server/api/canary/config.js @@ -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; } } };