<NME> addwatchItem.js
<BEF> /*
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
Copyright (c) 2014 Mozilla Corporation
 */

if (Meteor.isClient) {

    Template.watchItemform.rendered = function() {
        $('#watchcontent')[0].value = Session.get('watchItemwatchcontent');
    };

    Template.watchItemform.events({
        "submit form": function(event, template) {
            event.preventDefault();
            formobj=formToObject("#watchItemform :input");
            formobj.push({userid:Meteor.user().profile.email});
            Meteor.call('watchItem',formobj,
                onResultReceived = function(err,result){
                    if (typeof err == 'undefined') {
                        //console.log(result);
                        if ( result == true){
                            Session.set('displayMessage','listed watch item successfully ');
                        }else{
                            Session.set('errorMessage','watch item creation failed, returned & ' + JSON.stringify(result) );
                        }
                    }else{
                        Session.set('errorMessage','watch item failure & ' + JSON.stringify(err));
                    }
                });
            Router.go('/watchitem');
        }
    });

    Template.watchItemModal.rendered = function(){
        Deps.autorun(function() {
            $('#watchcontent')[0].value = Session.get('watchItemwatchcontent');
        }); //end deps.autorun
    };

    Template.watchItemModal.events({
        "submit form": function(event, template) {
            event.preventDefault();
            formobj=formToObject("#watchItemform :input");
            formobj.push({userid:Meteor.user().profile.email});
            Meteor.call('watchItem',formobj,
                onResultReceived = function(err,result){
                    if (typeof err == 'undefined') {
                        //console.log(result);
                        if ( result == true){
                            Session.set('displayMessage','listed watch item & successfully ');
                        }else{
                            Session.set('errorMessage','watch item creation failed, returned & ' + JSON.stringify(result) );
                        }
                    }else{
                        Session.set('errorMessage','watch item failure & ' + JSON.stringify(err));
                    }
                });
            $('#modalWatchItemWindow').modal('hide')
        }
    });
}

<MSG> changing route from /watchitem to /watchlist. Thanks @jeff

<DFF> @@ -29,7 +29,7 @@ if (Meteor.isClient) {
                         Session.set('errorMessage','watch item failure & ' + JSON.stringify(err));
                     }
                 });
-            Router.go('/watchitem');
+            Router.go('/watchlist');
         }
     });
 

{'commit': "diff --git a/meteor/client/addwatchItem.js b/meteor/client/addwatchItem.js\nindex 5021a0b7..3648fd08 100644\n--- a/meteor/client/addwatchItem.js\n+++ b/meteor/client/addwatchItem.js\n@@ -29,7 +29,7 @@ if (Meteor.isClient) {\n                         Session.set('errorMessage','watch item failure & ' + JSON.stringify(err));\n                     }\n                 });\n-            Router.go('/watchitem');\n+            Router.go('/watchlist');\n         }\n     });\n \n", 'commit_subject': 'changing route from /watchitem to /watchlist. Thanks @jeff', 'repo_name': 'mozilla/MozDef', 'committer': {'name': 'Phrozyn', 'email': '329761ccbbac92b6d84b8e98fb67579293c7905d@mozilla.com', 'time_sec': '1546913748', 'tz_offset': '-360', 'date': {'seconds': '1546913748'}}, 'commit_tree': '265ad1cdbd25763aead4f6a811410310c7b61e17', 'commit_message': 'changing route from /watchitem to /watchlist. Thanks @jeff\n', 'language_name': 'Shell', 'license': 'mpl-2.0', 'hunks': "@@ -29,7 +29,7 @@ if (Meteor.isClient) {\n                         Session.set('errorMessage','watch item failure & ' + JSON.stringify(err));\n                     }\n                 });\n-            Router.go('/watchitem');\n+            Router.go('/watchlist');\n         }\n     });\n \n", 'addition_count': 1, 'deletion_count': 1, 'src_file': 'a/meteor/client/addwatchItem.js', 'tgt_file': 'b/meteor/client/addwatchItem.js', 'file_extension': '.js', 'before_file': '/*\nThis Source Code Form is subject to the terms of the Mozilla Public\nLicense, v. 2.0. If a copy of the MPL was not distributed with this\nfile, You can obtain one at https://mozilla.org/MPL/2.0/.\nCopyright (c) 2014 Mozilla Corporation\n */\n\nif (Meteor.isClient) {\n\n    Template.watchItemform.rendered = function() {\n        $(\'#watchcontent\')[0].value = Session.get(\'watchItemwatchcontent\');\n    };\n\n    Template.watchItemform.events({\n        "submit form": function(event, template) {\n            event.preventDefault();\n            formobj=formToObject("#watchItemform :input");\n            formobj.push({userid:Meteor.user().profile.email});\n            Meteor.call(\'watchItem\',formobj,\n                onResultReceived = function(err,result){\n                    if (typeof err == \'undefined\') {\n                        //console.log(result);\n                        if ( result == true){\n                            Session.set(\'displayMessage\',\'listed watch item successfully \');\n                        }else{\n                            Session.set(\'errorMessage\',\'watch item creation failed, returned & \' + JSON.stringify(result) );\n                        }\n                    }else{\n                        Session.set(\'errorMessage\',\'watch item failure & \' + JSON.stringify(err));\n                    }\n                });\n            Router.go(\'/watchitem\');\n        }\n    });\n\n    Template.watchItemModal.rendered = function(){\n        Deps.autorun(function() {\n            $(\'#watchcontent\')[0].value = Session.get(\'watchItemwatchcontent\');\n        }); //end deps.autorun\n    };\n\n    Template.watchItemModal.events({\n        "submit form": function(event, template) {\n            event.preventDefault();\n            formobj=formToObject("#watchItemform :input");\n            formobj.push({userid:Meteor.user().profile.email});\n            Meteor.call(\'watchItem\',formobj,\n                onResultReceived = function(err,result){\n                    if (typeof err == \'undefined\') {\n                        //console.log(result);\n                        if ( result == true){\n                            Session.set(\'displayMessage\',\'listed watch item & successfully \');\n                        }else{\n                            Session.set(\'errorMessage\',\'watch item creation failed, returned & \' + JSON.stringify(result) );\n                        }\n                    }else{\n                        Session.set(\'errorMessage\',\'watch item failure & \' + JSON.stringify(err));\n                    }\n                });\n            $(\'#modalWatchItemWindow\').modal(\'hide\')\n        }\n    });\n}\n', 'message': 'changing route from /watchitem to /watchlist. Thanks @jeff\n', 'author_name': 'Phrozyn', 'lang': 'js'}