Syntax error, and removed old test function

This commit is contained in:
Kenneth Jao 2016-08-12 22:43:56 -04:00
parent eced94799b
commit f068fd23a6

View File

@ -222,7 +222,7 @@ Meteor.methods({
if (currentclass.subscribers.indexOf(Meteor.userId()) != -1 && if (currentclass.subscribers.indexOf(Meteor.userId()) != -1 &&
["confirmations", "reports", "done"].indexOf(input[1]) != -1) { ["confirmations", "reports", "done"].indexOf(input[1]) != -1) {
userindex = workobject[input[1]].indexOf(Meteor.userId()) userindex = workobject[input[1]].indexOf(Meteor.userId())
if userindex === -1 { if (userindex === -1) {
workobject[input[1]] = workobject[input[1]].push(Meteor.userId()); workobject[input[1]] = workobject[input[1]].push(Meteor.userId());
} else { } else {
workobject[input[1]] = workobject[input[1]].splice(userindex, 1); workobject[input[1]] = workobject[input[1]].splice(userindex, 1);
@ -332,11 +332,4 @@ Meteor.methods({
Roles.removeUsersToRoles(userId, ['admin']); Roles.removeUsersToRoles(userId, ['admin']);
} }
} }
}); });
function has(array, has) {
for (var i = 0; i < array.length; i++) {
if (array[i] === has) return true;
}
return false;
}