0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Bumped webhook API defaults to v4

refs https://github.com/TryGhost/Ghost/issues/12716

- The default API in Ghost v4 will be `'v4'`. When a new webhook is created or any data passes through serialization it should assume `v4` as a fallback if not specified.
This commit is contained in:
Naz 2021-03-02 12:31:44 +13:00
parent 069086e473
commit 72f25a7099
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@ Webhook = ghostBookshelf.Model.extend({
defaults() {
return {
api_version: 'v3',
api_version: 'v4',
status: 'available'
};
},

View file

@ -3,7 +3,7 @@ module.exports = (event, model) => {
const {sequence} = require('@tryghost/promise');
const api = require('../../api');
const apiVersion = model.get('api_version') || 'v3';
const apiVersion = model.get('api_version') || 'v4';
const resourceName = event.match(/(\w+)\./)[1];
const docName = `${resourceName}s`;