Ghost/core/server/api/v2/site.js
Kevin Ansfield 3b366dc55d
Fixed max-api-complexity linting warnings for site and config APIs (#12982)
no issue

- moved `config` and `site` API output generation to a `public-config` service allowing all API versions to use `publicConfig.config` or `publicConfig.site` in their query methods
- updated `config` and `site` API output serializers to use an allow-list that limits the data returned for each API version
2021-05-26 12:10:19 +01:00

15 lines
239 B
JavaScript

const publicConfig = require('../../services/public-config');
const site = {
docName: 'site',
read: {
permissions: false,
query() {
return publicConfig.site;
}
}
};
module.exports = site;