diff --git a/core/server/services/webhooks/serialize.js b/core/server/services/webhooks/serialize.js index 85f0521a85..73b0dad4b2 100644 --- a/core/server/services/webhooks/serialize.js +++ b/core/server/services/webhooks/serialize.js @@ -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 = [];