mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-01 23:37:43 +03: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
@ -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 = [];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user