Ghost/core/server/api/canary/site.js
Nazar Gargol 2de1c07dd4 Renamed settings key brand.primaryColor to accent_color
refs #10318
2614565d5a

- Changes naming throughout the codebase matching the change in the
referenced commit
2020-06-24 14:18:13 +12:00

32 lines
951 B
JavaScript

const ghostVersion = require('../../lib/ghost-version');
const settingsCache = require('../../services/settings/cache');
const urlUtils = require('../../../shared/url-utils');
const config = require('../../../shared/config');
const site = {
docName: 'site',
read: {
permissions: false,
query() {
const response = {
title: settingsCache.get('title'),
description: settingsCache.get('description'),
logo: settingsCache.get('logo'),
accent_color: settingsCache.get('accent_color'),
url: urlUtils.urlFor('home', true),
version: ghostVersion.safe
};
// accent_color is currently an experimental feature
if (!config.get('enableDeveloperExperiments')) {
delete response.accent_color;
}
return response;
}
}
};
module.exports = site;