mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 06:12:03 +03:00
4c3bd0e2e9
no-issue The flag currently defaults to `true` as we are still using stripe direct. We expose it on the admin api config endpoint so that the Ghost-Admin client can use it to conditionally render
31 lines
1.1 KiB
JavaScript
31 lines
1.1 KiB
JavaScript
const {isPlainObject} = require('lodash');
|
|
const config = require('../../config');
|
|
const labs = require('../../services/labs');
|
|
const ghostVersion = require('../../lib/ghost-version');
|
|
|
|
module.exports = {
|
|
docName: 'config',
|
|
|
|
read: {
|
|
permissions: false,
|
|
query() {
|
|
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,
|
|
mail: isPlainObject(config.get('mail')) ? config.get('mail').transport : '',
|
|
useGravatar: !config.isPrivacyDisabled('useGravatar'),
|
|
labs: labs.getAll(),
|
|
clientExtensions: config.get('clientExtensions') || {},
|
|
enableDeveloperExperiments: config.get('enableDeveloperExperiments') || false,
|
|
stripeDirect: config.get('stripeDirect')
|
|
};
|
|
if (billingUrl) {
|
|
response.billingUrl = billingUrl;
|
|
}
|
|
return response;
|
|
}
|
|
}
|
|
};
|