mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
💡 Upgraded Tenor API to v2 (#15087)
closes: https://github.com/TryGhost/Ghost/issues/14980
refs: cc276486f0
- Tenor is now operated by Google, and the old v1 Tenor API has been decommissioned
- At present anyone with a pre-configured tenor integration will get intermittent errors, whilst it is impossible to setup a new tenor API integration
- Sadly old keys do not work with the new API, and new keys do not work with the old API, so there is no happy path forward.
- After this lands, everyone will need to go and get a new Google API Key for Tenor, update their config, and then the integration will work properly again.
- This particular change renames the API key from `publicReadOnlyApiKey` to `googleApiKey` to reflect that the key itself changes in type and behaviour
Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
This commit is contained in:
parent
ba863966ad
commit
182a7ea07c
@ -25,8 +25,7 @@ export default class TenorService extends Service {
|
||||
_nextPos = null;
|
||||
|
||||
get apiKey() {
|
||||
// @TODO confirm this!
|
||||
return this.config.get('tenor.apiKey');
|
||||
return this.config.get('tenor.googleApiKey');
|
||||
}
|
||||
|
||||
get contentfilter() {
|
||||
|
@ -195,7 +195,7 @@ export const CARD_MENU = [
|
||||
payload: {
|
||||
imageSelector: 'tenor'
|
||||
},
|
||||
isAvailable: 'config.tenor.publicReadOnlyApiKey'
|
||||
isAvailable: 'config.tenor.googleApiKey'
|
||||
},
|
||||
{
|
||||
label: 'Toggle',
|
||||
|
@ -153,7 +153,7 @@
|
||||
"url": "https://unpkg.com/@tryghost/koenig-react/dist/umd/koenig-react.min.js"
|
||||
},
|
||||
"tenor": {
|
||||
"publicReadOnlyApiKey": null,
|
||||
"googleApiKey": null,
|
||||
"contentFilter": "off"
|
||||
},
|
||||
"opensea": {
|
||||
|
@ -15,12 +15,12 @@ describe('Config API', function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
configUtils.set('tenor:publicReadOnlyApiKey', undefined);
|
||||
configUtils.set('tenor:googleApiKey', 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('tenor:publicReadOnlyApiKey', 'TENOR_KEY');
|
||||
configUtils.set('tenor:googleApiKey', 'TENOR_KEY');
|
||||
|
||||
const res = await request
|
||||
.get(localUtils.API.getApiQuery('config/'))
|
||||
|
Loading…
Reference in New Issue
Block a user