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:
parent
6c50dadb90
commit
71951eabea
1 changed files with 3 additions and 1 deletions
|
@ -4,7 +4,9 @@ module.exports = (event, model) => {
|
||||||
const api = require('../../api');
|
const api = require('../../api');
|
||||||
|
|
||||||
const apiVersion = model.get('api_version') || 'v2';
|
const apiVersion = model.get('api_version') || 'v2';
|
||||||
const docName = model.tableName;
|
|
||||||
|
const resourceName = event.match(/(\w+)\./)[1];
|
||||||
|
const docName = `${resourceName}s`;
|
||||||
|
|
||||||
const ops = [];
|
const ops = [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue