From f068fd23a65d510496da9e1d1b8b7365665ba697 Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Fri, 12 Aug 2016 22:43:56 -0400 Subject: [PATCH] Syntax error, and removed old test function --- hourglass/server/main.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/hourglass/server/main.js b/hourglass/server/main.js index 3c30422..0c39c48 100644 --- a/hourglass/server/main.js +++ b/hourglass/server/main.js @@ -222,7 +222,7 @@ Meteor.methods({ if (currentclass.subscribers.indexOf(Meteor.userId()) != -1 && ["confirmations", "reports", "done"].indexOf(input[1]) != -1) { userindex = workobject[input[1]].indexOf(Meteor.userId()) - if userindex === -1 { + if (userindex === -1) { workobject[input[1]] = workobject[input[1]].push(Meteor.userId()); } else { workobject[input[1]] = workobject[input[1]].splice(userindex, 1); @@ -332,11 +332,4 @@ Meteor.methods({ Roles.removeUsersToRoles(userId, ['admin']); } } -}); - -function has(array, has) { - for (var i = 0; i < array.length; i++) { - if (array[i] === has) return true; - } - return false; -} +}); \ No newline at end of file