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