mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
refs https://github.com/TryGhost/Team/issues/1599 - adds `portal_*` settings to public settings endpoint - adds calculated `firstpromoter_account` setting for public settings endpoint - also adds Ghost `version` information
19 lines
668 B
JavaScript
19 lines
668 B
JavaScript
const settingsCache = require('../../../shared/settings-cache');
|
|
const urlUtils = require('../../../shared/url-utils');
|
|
const ghostVersion = require('@tryghost/version');
|
|
|
|
module.exports = {
|
|
docName: 'settings',
|
|
|
|
browse: {
|
|
permissions: true,
|
|
query() {
|
|
// @TODO: decouple settings cache from API knowledge
|
|
// The controller fetches models (or cached models) and the API frame for the target API version formats the response.
|
|
return Object.assign({}, settingsCache.getPublic(), {
|
|
url: urlUtils.urlFor('home', true),
|
|
version: ghostVersion.safe
|
|
});
|
|
}
|
|
}
|
|
};
|