0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Fixed webhook resource name for page events

no issue

- posts & pages live in the same table, need to use the event name
This commit is contained in:
kirrg001 2019-02-25 23:51:23 +01:00
parent 6c50dadb90
commit 71951eabea

View file

@ -4,7 +4,9 @@ module.exports = (event, model) => {
const api = require('../../api');
const apiVersion = model.get('api_version') || 'v2';
const docName = model.tableName;
const resourceName = event.match(/(\w+)\./)[1];
const docName = `${resourceName}s`;
const ops = [];