mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 09:22:49 +03:00
6f579331e1
refs: https://github.com/TryGhost/Team/issues/510 - Changed to return the full hostSettings key, not just the billing URL - We are introducing several more settings that are needed by Admin including limits - Passing the whole object makes this much easier to reason about as Admin has the exact same config as the server
30 lines
1.2 KiB
JavaScript
30 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 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'),
|
|
mailgunIsConfigured: config.get('bulkEmail') && config.get('bulkEmail').mailgun,
|
|
emailAnalytics: config.get('emailAnalytics'),
|
|
hostSettings: config.get('hostSettings')
|
|
};
|
|
return response;
|
|
}
|
|
}
|
|
};
|