You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/11/17 21:48:22 UTC

[GitHub] csantanapr closed pull request #146: reject update if trigger is disabled

csantanapr closed pull request #146: reject update if trigger is disabled
URL: https://github.com/apache/incubator-openwhisk-package-cloudant/pull/146
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/actions/changesWebAction.js b/actions/changesWebAction.js
index 73186d7..7078b73 100644
--- a/actions/changesWebAction.js
+++ b/actions/changesWebAction.js
@@ -145,6 +145,9 @@ function main(params) {
                 return getTrigger(db, triggerID);
             })
             .then(trigger => {
+                if (!trigger.status.active) {
+                    reject(sendError(400, `${params.triggerName} cannot be updated because it is disabled`));
+                }
                 if (params.filter || params.query_params) {
                     var updatedParams = {
                         filter: trigger.filter,


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services