2019-01-03 18:23:22 +03:00
|
|
|
const settingsCache = require('../../services/settings/cache');
|
2019-07-24 13:12:07 +03:00
|
|
|
const urlUtils = require('../../lib/url-utils');
|
2019-01-03 18:23:22 +03:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
docName: 'settings',
|
|
|
|
|
|
|
|
browse: {
|
|
|
|
permissions: true,
|
|
|
|
query() {
|
2019-01-15 15:03:17 +03:00
|
|
|
// @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.
|
2019-07-24 13:12:07 +03:00
|
|
|
return Object.assign({}, settingsCache.getPublic(), {
|
|
|
|
url: urlUtils.urlFor('home', true)
|
|
|
|
});
|
2019-01-03 18:23:22 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|