Ghost/core/server/api/canary/config.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

13 lines
223 B
JavaScript

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