mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Added actions events for integrations and webhooks
refs https://github.com/TryGhost/Toolbox/issues/356 - this allows Ghost to collect CRUD events for integrations and webhooks, to eventually be shown in the audit log
This commit is contained in:
parent
37ef0582e6
commit
bbb5cd24c8
2 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,9 @@ const {NoPermissionError} = require('@tryghost/errors');
|
||||||
const Integration = ghostBookshelf.Model.extend({
|
const Integration = ghostBookshelf.Model.extend({
|
||||||
tableName: 'integrations',
|
tableName: 'integrations',
|
||||||
|
|
||||||
|
actionsCollectCRUD: true,
|
||||||
|
actionsResourceType: 'integration',
|
||||||
|
|
||||||
relationships: ['api_keys', 'webhooks'],
|
relationships: ['api_keys', 'webhooks'],
|
||||||
|
|
||||||
relationshipBelongsTo: {
|
relationshipBelongsTo: {
|
||||||
|
|
|
@ -7,6 +7,9 @@ let Webhooks;
|
||||||
Webhook = ghostBookshelf.Model.extend({
|
Webhook = ghostBookshelf.Model.extend({
|
||||||
tableName: 'webhooks',
|
tableName: 'webhooks',
|
||||||
|
|
||||||
|
actionsCollectCRUD: true,
|
||||||
|
actionsResourceType: 'webhook',
|
||||||
|
|
||||||
defaults() {
|
defaults() {
|
||||||
return {
|
return {
|
||||||
api_version: `v${ghostVersion.safe}`,
|
api_version: `v${ghostVersion.safe}`,
|
||||||
|
|
Loading…
Reference in a new issue