//this file is for forms validation can
//be accessed from both server and client

Meteor.methods({
    addQuestion: function (newQues) {
        // Perform validation
        if (newQues.text == "") {
            throw new Meteor.Error(413, "Empty field!");
        }
        // Insert Ques (simulate on client, do it on server)
        return Questions.insert(newQues);
    },
    addAnswer: function (newAns) {
        // Perform validation
        if (newAns.text == "") {
            throw new Meteor.Error(413, "Empty field!");
        }
        // Insert Ques (simulate on client, do it on server)
        return Answers.insert(newAns);
    },
    updateQuestion: function (question) {
      // Perform validation
      if (question.text == "") {
          throw new Meteor.Error(413, "Empty field!");
      }
      Questions.update({text: question.text},
                       {pic1Id: question.pic1Id},
                       {pic2Id: question.pic2Id},
                       {pic3Id: question.pic3Id},
                       {pic4Id: question.pic4Id});
    },
    serverNotification: function () {
      //get only helpers
        var allUsers = Meteor.users.find().fetch();
        var helpers = [];
        var j=0;
        for (var i = 0; i < allUsers.length; i++) {
          if (allUsers[i].roles[0] == "helper")
          {
            helpers[j] = allUsers[i];
            j++;
          }
        }
        if(helpers){
          Push.send({
            from: Meteor.user().username,
            title: 'you have unseen notifications',
            text: 'new Question was asked',
            query: {}
          });
        }
	  }
});

@@ -1066,588 +1066,8 @@
    %7D
-,%0A    serverNotification: function () %7B%0A      //get only helpers%0A        var allUsers = Meteor.users.find().fetch();%0A        var helpers = %5B%5D;%0A        var j=0;%0A        for (var i = 0; i %3C allUsers.length; i++) %7B%0A          if (allUsers%5Bi%5D.roles%5B0%5D == %22helper%22)%0A          %7B%0A            helpers%5Bj%5D = allUsers%5Bi%5D;%0A            j++;%0A          %7D%0A        %7D%0A        if(helpers)%7B%0A          Push.send(%7B%0A            from: Meteor.user().username,%0A            title: 'you have unseen notifications',%0A            text: 'new Question was asked',%0A            query: %7B%7D%0A          %7D);%0A        %7D%0A%09  %7D
 %0A%7D);

Update methods.js