2021-06-30 14:56:57 +01:00
|
|
|
const settingsCache = require('../../../shared/settings-cache');
|
2020-05-28 05:57:02 -05:00
|
|
|
const urlUtils = require('../../../shared/url-utils');
|
2022-05-12 19:54:45 +05:30
|
|
|
const ghostVersion = require('@tryghost/version');
|
2019-08-09 19:41:24 +05:30
|
|
|
|
|
|
|
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(), {
|
2022-05-12 19:54:45 +05:30
|
|
|
url: urlUtils.urlFor('home', true),
|
|
|
|
version: ghostVersion.safe
|
2019-08-09 19:41:24 +05:30
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|