You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2017/11/17 21:48:20 UTC

[incubator-openwhisk-package-cloudant] branch master updated: reject update if trigger is disabled (#146)

This is an automated email from the ASF dual-hosted git repository.

csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-package-cloudant.git


The following commit(s) were added to refs/heads/master by this push:
     new b17b13b  reject update if trigger is disabled (#146)
b17b13b is described below

commit b17b13bf5bc23451ca3ad09e014180ff0e91f62e
Author: Adnan Baruni <ab...@users.noreply.github.com>
AuthorDate: Fri Nov 17 15:48:19 2017 -0600

    reject update if trigger is disabled (#146)
---
 actions/changesWebAction.js | 3 +++
 1 file changed, 3 insertions(+)

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,

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].