Add Feature: enable two-way webhooks - stage two

This commit is contained in:
Sam X. Chen 2019-08-29 22:07:40 -04:00
parent 3f0600fed7
commit dd0682328b
4 changed files with 103 additions and 26 deletions

View file

@ -90,7 +90,11 @@ Integrations.attachSchema(
);
Integrations.Const = {
GLOBAL_WEBHOOK_ID: '_global',
WEBHOOK_TYPES: ['outgoing-webhooks', 'bidirectional-webhooks'],
ONEWAY: 'outgoing-webhooks',
TWOWAY: 'bidirectional-webhooks',
get WEBHOOK_TYPES() {
return [this.ONEWAY, this.TWOWAY];
},
};
const permissionHelper = {
allow(userId, doc) {