mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 18:01:36 +03:00
15d9a77092
* moved `server/config` to `shared/config` * updated config import paths in server to use shared * updated config import paths in frontend to use shared * updated config import paths in test to use shared * updated config import paths in root to use shared * trigger regression tests * of course the rebase broke tests
31 lines
1.2 KiB
JavaScript
31 lines
1.2 KiB
JavaScript
const {isPlainObject} = require('lodash');
|
|
const config = require('../../../shared/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;
|
|
}
|
|
}
|
|
};
|