Added ability to regenerate outgoing webhook tokens on InstalledIntegrations page
Этот коммит содержится в:
@@ -77,6 +77,15 @@ class IntegrationStore extends EventEmitter {
|
||||
this.outgoingWebhooks.push(outgoingWebhook);
|
||||
}
|
||||
|
||||
updateOutgoingWebhook(outgoingWebhook) {
|
||||
for (let i = 0; i < this.outgoingWebhooks.length; i++) {
|
||||
if (this.outgoingWebhooks[i].id === outgoingWebhook.id) {
|
||||
this.outgoingWebhooks[i] = outgoingWebhook;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
removeOutgoingWebhook(id) {
|
||||
for (let i = 0; i < this.outgoingWebhooks.length; i++) {
|
||||
if (this.outgoingWebhooks[i].id === id) {
|
||||
@@ -110,6 +119,10 @@ class IntegrationStore extends EventEmitter {
|
||||
this.addOutgoingWebhook(action.outgoingWebhook);
|
||||
this.emitChange();
|
||||
break;
|
||||
case ActionTypes.UPDATED_OUTGOING_WEBHOOK:
|
||||
this.updateOutgoingWebhook(action.outgoingWebhook);
|
||||
this.emitChange();
|
||||
break;
|
||||
case ActionTypes.REMOVED_OUTGOING_WEBHOOK:
|
||||
this.removeOutgoingWebhook(action.id);
|
||||
this.emitChange();
|
||||
|
||||
Ссылка в новой задаче
Block a user