mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Added Tenor contentFilter setting to config
refs https://github.com/TryGhost/Team/issues/1217 - moved top-level `tenorApiKey` to `tenor:apiKey` and added `tenor:contentFilter` - added base config to `defaults.json` - updated `public-config.js` and API output serializer to use the new top-level `tenor` key
This commit is contained in:
parent
9fba3d6661
commit
63b7ef7dc6
@ -22,7 +22,7 @@ module.exports = {
|
||||
];
|
||||
|
||||
if (labs.isSet('gifsCard')) {
|
||||
keys.push('tenorApiKey');
|
||||
keys.push('tenor');
|
||||
}
|
||||
|
||||
frame.response = {
|
||||
|
@ -17,7 +17,7 @@ module.exports = function getConfigProperties() {
|
||||
mailgunIsConfigured: config.get('bulkEmail') && config.get('bulkEmail').mailgun,
|
||||
emailAnalytics: config.get('emailAnalytics'),
|
||||
hostSettings: config.get('hostSettings'),
|
||||
tenorApiKey: config.get('tenorApiKey')
|
||||
tenor: config.get('tenor')
|
||||
};
|
||||
|
||||
const billingUrl = config.get('hostSettings:billing:enabled') ? config.get('hostSettings:billing:url') : '';
|
||||
|
@ -128,5 +128,9 @@
|
||||
"portal": {
|
||||
"url": "https://unpkg.com/@tryghost/portal@~1.12.0/umd/portal.min.js",
|
||||
"version": "1.12"
|
||||
},
|
||||
"tenor": {
|
||||
"apiKey": null,
|
||||
"contentFilter": "off"
|
||||
}
|
||||
}
|
||||
|
@ -15,12 +15,12 @@ describe('Config API', function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
configUtils.set('tenorApiKey', undefined);
|
||||
configUtils.set('tenor:apiKey', undefined);
|
||||
});
|
||||
|
||||
it('can retrieve config and all expected properties', async function () {
|
||||
// set any non-default keys so we can be sure they're exposed
|
||||
configUtils.set('tenorApiKey', 'TENOR_KEY');
|
||||
configUtils.set('tenor:apiKey', 'TENOR_KEY');
|
||||
|
||||
const res = await request
|
||||
.get(localUtils.API.getApiQuery('config/'))
|
||||
|
@ -29,7 +29,7 @@ const expectedProperties = {
|
||||
|
||||
action: ['id', 'resource_type', 'actor_type', 'event', 'created_at', 'actor'],
|
||||
|
||||
config: ['version', 'environment', 'database', 'mail', 'labs', 'clientExtensions', 'enableDeveloperExperiments', 'useGravatar', 'stripeDirect', 'emailAnalytics', 'tenorApiKey'],
|
||||
config: ['version', 'environment', 'database', 'mail', 'labs', 'clientExtensions', 'enableDeveloperExperiments', 'useGravatar', 'stripeDirect', 'emailAnalytics', 'tenor'],
|
||||
|
||||
post: [
|
||||
'id',
|
||||
|
Loading…
Reference in New Issue
Block a user