mirror of
https://github.com/strapi/strapi.git
synced 2025-12-06 03:52:38 +00:00
feature(ee): register review workflow webhook events
This commit is contained in:
parent
933a2e3dff
commit
1c66cdf679
@ -108,6 +108,9 @@ function persistStagesJoinTables({ strapi }) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const registerWebhookEvents = async () =>
|
||||||
|
strapi.webhookStore.allowedEvents.set('WORKFLOW_STAGE_CHANGE', 'workflow.stage.change');
|
||||||
|
|
||||||
module.exports = ({ strapi }) => {
|
module.exports = ({ strapi }) => {
|
||||||
const workflowsService = getService('workflows', { strapi });
|
const workflowsService = getService('workflows', { strapi });
|
||||||
const stagesService = getService('stages', { strapi });
|
const stagesService = getService('stages', { strapi });
|
||||||
@ -115,6 +118,7 @@ module.exports = ({ strapi }) => {
|
|||||||
return {
|
return {
|
||||||
async bootstrap() {
|
async bootstrap() {
|
||||||
await initDefaultWorkflow({ workflowsService, stagesService, strapi });
|
await initDefaultWorkflow({ workflowsService, stagesService, strapi });
|
||||||
|
await registerWebhookEvents();
|
||||||
},
|
},
|
||||||
async register() {
|
async register() {
|
||||||
extendReviewWorkflowContentTypes({ strapi });
|
extendReviewWorkflowContentTypes({ strapi });
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user